[issue3460] PyUnicode_Join could perhaps be simpler

Marc-Andre Lemburg report at bugs.python.org
Tue Jul 29 11:06:29 CEST 2008


Marc-Andre Lemburg <mal at egenix.com> added the comment:

The comment gives a wrong impression: The problem is not (only) that a
codec might by evil, it's the fact that a codec may well execute Python
code and thus allow the list to be changed by other threads during the
operation.

Now, since in Python 3.x codecs are no longer being invoked, it is
probably safe to assume that Python code is not being executed while
PyUnicode_Join() is running, but please double-check.

It's also wise to apply a sanity check at the end of the loop to check
whether the sequence length has indeed not changed (as assert maybe).

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3460>
_______________________________________


More information about the Python-bugs-list mailing list