Mark Shannon <m...@hotpy.org> added the comment:

The problem here is that different sub-interpreters have different strings for 
the same Python string.

Unless sub-interpreters are fully independent, and they cannot be due to 
limitations imposed by the stable API, then all sub-interpreters must share the 
same poll of strings.

Since the only object reachable from a string is the `str` object (which is a 
static global object `PyUnicode_Type`), then the invariant that no object that 
is unique to one sub-interpreter can be reached from another sub-interpreter 
remains valid if strings are shared. I.e. there is no reason not to share 
strings.

As Victor points out, there is no bug in 3.9 because interned strings are 
common across all interpreter. We should revert that behavior.

----------
nosy: +Mark.Shannon

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46006>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to