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

Walter Dörwald walter at livinglogic.de
Fri Jun 14 16:55:24 CEST 2013


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



More information about the Python-Dev mailing list