[issue4626] compile() doesn't ignore the source encoding when a string is passed in

Benjamin Peterson report at bugs.python.org
Tue Jan 27 04:32:54 CET 2009


Benjamin Peterson <benjamin at python.org> added the comment:

I don't like the change of API to PyTokenizer_FromString. I would prefer
another function like PyTokenizer_IgnoreCodingCookie() blows up when
parsing has already started.

The (char *) cast in PyTokenizer_FromString is unneeded.

You need to indent the "else" clause after you test for ignore_cookie.

I'd like to see a test that shows that byte strings still have their
cookies examined.

----------
nosy: +benjamin.peterson

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


More information about the Python-bugs-list mailing list