This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2008年12月11日 06:54 by brett.cannon, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg77596 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2008年12月11日 06:54 | |
Passing in bytes to compile() works well for letting the parser handle the decoding of a file when an encoding is specified, but it doesn't take care of universal newlines:: >>> source = b'a = 1\r\nb = 2\r\n' >>> compile(source, '<test>', 'exec') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<test>", line 1 a = 1 ^ SyntaxError: invalid syntax |
|||
| msg83847 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2009年03月20日 01:58 | |
This problem is not new. exec() in Python 2.x doesn't accept \r\n newlines. See also related(?) issue: #5524 |
|||
| msg84127 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2009年03月24日 23:44 | |
See also related issue: #4377 (tokenize.detect_encoding() and Mac newline). |
|||
| msg95164 - (view) | Author: Benjamin Peterson (benjamin.peterson) * (Python committer) | Date: 2009年11月12日 23:40 | |
Finally got around to fixing this. r76230 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:42 | admin | set | github: 48878 |
| 2009年11月12日 23:40:16 | benjamin.peterson | set | status: open -> closed nosy: + benjamin.peterson messages: + msg95164 resolution: fixed |
| 2009年03月24日 23:44:28 | vstinner | set | messages: + msg84127 |
| 2009年03月21日 10:51:36 | vstinner | link | issue4282 dependencies |
| 2009年03月21日 10:48:16 | vstinner | link | issue5524 dependencies |
| 2009年03月20日 01:58:31 | vstinner | set | nosy:
+ vstinner messages: + msg83847 |
| 2008年12月11日 06:54:06 | brett.cannon | create | |