Message74207
@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. |
|
Date |
User |
Action |
Args |
2008-10-02 23:05:40 | vstinner | set | recipients:
+ vstinner, loewis |
2008-10-02 23:05:40 | vstinner | set | messageid: <1222988740.33.0.482691906489.issue4008@psf.upfronthosting.co.za> |
2008-10-02 23:05:39 | vstinner | link | issue4008 messages |
2008-10-02 23:05:39 | vstinner | create | |
|