[issue7268] 2to3 execfile conversion changes behavior
Benjamin Peterson
report at bugs.python.org
Fri Nov 6 02:25:47 CET 2009
Benjamin Peterson <benjamin at python.org> added the comment:
2009/11/5 flashk <report at bugs.python.org>:
>
> flashk <flashk at gmail.com> added the comment:
>
> Ok, I converted test.py to use Unix style newlines and still get the
> syntax error on both 2.6 and 3.1. I'm confused as to why execfile works on
> the file but reading the contents and passing it to exec behaves
> differently under 2.6. Sorry if I'm just being dense.
open in 2.x does not translate newlines by default. It does so in 3.x.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7268>
_______________________________________
More information about the Python-bugs-list
mailing list