This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients benjamin.peterson, terry.reedy
Date 2010-12-29.20:01:35
SpamBayes Score 8.660245e-06
Marked as misclassified No
Message-id <1293652902.05.0.92926379276.issue10792@psf.upfronthosting.co.za>
In-reply-to
Content
In python-list thread "Does Python 3.1 accept \r\n in compile()?"
jmfauth notes that
compile('print(999)\r\n', '<in>', 'exec')
works in 2.7 but not 3.1 (and 3.2 not checked) because 3.1 sees '\r' as
SyntaxError.

I started to respond that this is part of Py3 cleanup with newlines converted on input and back-compatibility with ancient Python not needed. Then I saw in 3.2 manual

"Changed in version 3.2: Allowed use of Windows and Mac newlines. ..."

However, above gives same error. Should "Allowed use of Windows and Mac newlines." be deleted? What else could it mean other than use of '\r' or '\r\n'?

The note was added in r76232 which is a forward port of r76230
"fix several compile() issues by translating newlines in the tokenizer"
by B. Peterson. Is Windows/Mac part just not applicable to 3.2?
History
Date User Action Args
2010-12-29 20:01:42terry.reedysetrecipients: + terry.reedy, benjamin.peterson
2010-12-29 20:01:42terry.reedysetmessageid: <1293652902.05.0.92926379276.issue10792@psf.upfronthosting.co.za>
2010-12-29 20:01:35terry.reedylinkissue10792 messages
2010-12-29 20:01:35terry.reedycreate