Does Python 3.1 accept \r\n in compile()?

jmfauth wxjmfauth at gmail.com
Sun Jan 16 05:55:58 EST 2011


Just an info, addendum.

>>> sys.version
'3.2rc1 (r32rc1:88035, Jan 15 2011, 21:05:51) [MSC v.1500 32 bit
(Intel)]'
>>> compile('if True:\r\n    print(999)\r\n', '<in>', 'exec')

<code object <module> at 0x023CA610, file "<in>", line 2>
>>> exec(compile('if True:\r\n    print(999)\r\n', '<in>', 'exec'))
999
>>>





More information about the Python-list mailing list