[Python-Dev] eval and triple quoted strings (original) (raw)

Guido van Rossum guido at python.org
Fri Jun 14 17:36:48 CEST 2013


Not a bug. The same is done for file input -- CRLF is changed to LF before tokenizing. On Jun 14, 2013 8:27 AM, "Walter Dörwald" <walter at livinglogic.de> wrote:

Hello all!

This surprised me: >>> eval("'''\r\n'''") '\n' Where did the \r go? ast.literaleval() has the same problem: >>> ast.literaleval("'''\r\n'''") '\n' Is this a bug/worth fixing? Servus, Walter _______** Python-Dev mailing list Python-Dev at python.org 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> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20130614/e8a158fb/attachment.html>



More information about the Python-Dev mailing list