[New-bugs-announce] [issue11434] Python 3.2 input() does not remove "\r" at the end of returned string.
Joshua Logan
report at bugs.python.org
Mon Mar 7 18:22:23 CET 2011
New submission from Joshua Logan <dear.jay.logan at gmail.com>:
Hello,
It is mentioned in the documentation for input() ( http://docs.python.org/py3k/library/functions.html#input ) that the newline is stripped from the end of the returned string. However, on Windows, it used to trim '\r\n'. Now it no longer trims '\r'.
See output below:
C:\>python
Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on win32
>>> name = input("What's your name? ")
What's your name? Josh
>>> print(name)
Josh
>>> print(list(name))
['J', 'o', 's', 'h', '\r']
----------
components: Windows
messages: 130265
nosy: jaylogan
priority: normal
severity: normal
status: open
title: Python 3.2 input() does not remove "\r" at the end of returned string.
type: behavior
versions: Python 3.2
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11434>
_______________________________________
More information about the New-bugs-announce
mailing list