[issue10114] compile() doesn't support the PEP 383 (surrogates)

Terry J. Reedy report at bugs.python.org
Fri Oct 15 23:50:14 CEST 2010


Terry J. Reedy <tjreedy at udel.edu> added the comment:

I think the title is slightly misleading. As I read the patch, the issue is that PyArg_ParseTupleAndKeywords requires that string args to C functions be valid Unicode strings (and that it does this by trying to encode to utf-8). Your patch subverts this by redefining filename to be a generic object, with a looser custom-coded test. It is not clear to me that filename, out of all string args to builtins, should be excepted this way. It seems to me that any real filename should be real unicode and there is no need for fake names that are not.

----------
nosy: +terry.reedy

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


More information about the Python-bugs-list mailing list