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

jmfauth wxjmfauth at gmail.com
Thu Dec 30 03:13:50 EST 2010


On 30 Dez., 00:11, Terry Reedy <tjre... at udel.edu> wrote:
> On 12/29/2010 4:06 PM, jmfauth wrote:
>
>
>
> > On 29 Dez., 21:14, Terry Reedy<tjre... at udel.edu>  wrote:
> >> On 12/29/2010 2:31 PM, Terry Reedy wrote:
>
> >>> "Changed in version 3.2: Allowed use of Windows and Mac newlines. Also
> >>> input in 'exec' mode does not have to end in a newline anymore. Added
> >>> the optimize parameter."
>
> >> Retest shows that above is correct.
>
> >>   >>>  compile("print(999)\r\n", "blah", "exec")
>
> >> <code object<module>  at 0x00F5EC50, file "blah", line 1>
>
> > Ok, I see. Thanks.
>
> > The '\r\n' acceptance has been introduced in Python 2.7
> > and I was a little bit suprised with Python 3.1.
>
> 2.6 was followed by 3.0 and then 3.1.
> 2.7 will be followed by 3.2 in a couple more month.
> That feature was added to 2.7 and 3.2 in Nov 2009 long after 3.1.
>
> --
> Terry Jan Reedy

Thanks for these precisions and don't worry too much, it's
not a real isssue.

(I'v seen the "noise" on the pydev list).

Thanks again.



More information about the Python-list mailing list