[Python-Dev] eval and triple quoted strings (original) (raw)
Walter Dörwald walter at livinglogic.de
Fri Jun 14 16:55:24 CEST 2013
- Previous message: [Python-Dev] cpython: Move test_pep352 over to unittest.main()
- Next message: [Python-Dev] eval and triple quoted strings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] cpython: Move test_pep352 over to unittest.main()
- Next message: [Python-Dev] eval and triple quoted strings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]