py32 on windows - input() includes trailing \r

Peter Otten __peter__ at web.de
Wed Apr 20 08:58:56 EDT 2011


Frank Millman wrote:

> On linux, python 3.2 -
> 
>>>> x = input()
> xyz
>>>> len(x)
> 3
>>>> x
> 'xyz'
> 
> on windows, python 3.2 -
> 
>>>> x = input()
> xyz
>>>> len(x)
> 4
>>>> x
> 'xyz\r'
> 
> Is this expected behaviour?

No, that's a bug:

http://bugs.python.org/issue11272 

IMO it's severe enough to warrant a brown-bag release...




More information about the Python-list mailing list