classification
Title: Compile() and 'Windows/Mac newlines'
Type: Stage:
Components: Documentation Versions: Python 3.2
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: benjamin.peterson Nosy List: benjamin.peterson, terry.reedy
Priority: normal Keywords:

Created on 2010-12-29 20:01 by terry.reedy, last changed 2010-12-29 20:07 by terry.reedy. This issue is now closed.

Messages (2)
msg124872 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-12-29 20:01
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?
msg124873 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-12-29 20:07
I made a mistake in testing. Sorry for the noise.
History
Date User Action Args
2010-12-29 20:07:08terry.reedysetstatus: open -> closed

messages: + msg124873
resolution: not a bug
2010-12-29 20:01:35terry.reedycreate