[issue4008] IDLE: checksyntax() doesn't support Unicode?

STINNER Victor report at bugs.python.org
Fri Oct 3 01:05:40 CEST 2008


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

@loewis: Ok, I didn't know. I think that it's better to reuse existing 
code.

I also compared the implementations of encoding detection, and the 
code looks the same in IDLE and tokenize, but I prefer tokenize. 
tokenize.detect_encoding() has longer documentation, return the line 
(decoded as Unicode) matching the encoding cookie, and look to be more 
robust.

I saw an interesting test in IDLE code: it checks the charset. So I 
wrote a patch raising a SyntaxError for tokenize: issue4021.

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


More information about the Python-bugs-list mailing list