Issue 11642: regression: input() doesn't strip a trailing newline on Windows

Issue11642

Created on 2011-03-22 23:35 by techtonik, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg131812 - (view) Author: anatoly techtonik (techtonik) Date: 2011-03-22 23:35
Docs say that input() should strip trailing newline, but on Windows it doesn't happen.
http://docs.python.org/py3k/library/functions.html#input


Python 2.x Windows
>>> raw_input()
xyz
'xyz'
>>>

Python 3.2 Windows
>>> input()
zyx
'zyx\r'
>>>
msg131813 - (view) Author: Andreas Stührk (Trundle) * Date: 2011-03-22 23:37
This is a duplicate of issue #11272.
msg131815 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2011-03-22 23:39
3.2.1 will have the fix.
History
Date User Action Args
2022-04-11 14:57:15adminsetgithub: 55851
2011-03-22 23:39:07brian.curtinsetstatus: open -> closed

nosy: + brian.curtin
messages: + msg131815

resolution: duplicate
stage: resolved

2011-03-22 23:37:29Trundlesetnosy: + Trundle
messages: + msg131813
2011-03-22 23:35:26techtonikcreate