homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author BKHare
Recipients BKHare
Date 2011年06月28日.22:25:16
SpamBayes Score 1.6844692e-11
Marked as misclassified No
Message-id <1309299917.58.0.776675076833.issue12435@psf.upfronthosting.co.za>
In-reply-to
Content
In Windows, using python 3.2, the built-input function does not strip the trailing '\r' from the string input:
Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> input('Enter > ')
Enter > abcde
'abcde\r'
>>>
This behavior does not appear in IDLE but does appear in a free-standing command window. 
While the docs only say that the trailing newline is dropped, the 2.6 docs for raw_input have exactly the same wording and the carriage return is dropped:
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> raw_input('Enter > ')
Enter > abcde
'abcde'
>>>
History
Date User Action Args
2011年06月28日 22:25:17BKHaresetrecipients: + BKHare
2011年06月28日 22:25:17BKHaresetmessageid: <1309299917.58.0.776675076833.issue12435@psf.upfronthosting.co.za>
2011年06月28日 22:25:16BKHarelinkissue12435 messages
2011年06月28日 22:25:16BKHarecreate

AltStyle によって変換されたページ (->オリジナル) /