On 06/14/2013 10:36 AM, Guido van Rossum wrote:
Not a bug. The same is done for file input -- CRLF is changed to LF before
tokenizing.
Should this be the same?
python3 -c 'print(bytes("""\r\n""", "utf8"))'
b'\r\n'
>>> eval('print(bytes("""\r\n""", "utf8"))')
b'\n'
Ron
On Jun 14, 2013 8:27 AM, "Walter Dörwald" <[email protected]
<mailto:[email protected]>> wrote:
Hello all!
This surprised me:
>>> eval("'''\r\n'''")
'\n'
Where did the \r go? ast.literal_eval() has the same problem:
>>> ast.literal_eval("'''\r\n'''")
'\n'
Is this a bug/worth fixing?
Servus,
Walter
_________________________________________________
Python-Dev mailing list
[email protected] <mailto:[email protected]>
http://mail.python.org/__mailman/listinfo/python-dev
<http://mail.python.org/mailman/listinfo/python-dev>
Unsubscribe:
http://mail.python.org/__mailman/options/python-dev/__guido%40python.org
<http://mail.python.org/mailman/options/python-dev/guido%40python.org>
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com