Message128964
| Author |
duncanb |
| Recipients |
duncanb |
| Date |
2011年02月21日.15:48:23 |
| SpamBayes Score |
6.573252e-08 |
| Marked as misclassified |
No |
| Message-id |
<1298303304.94.0.0754812016321.issue11272@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
In Python 3.2, the builtin function `input()` returns a string with a trailing '\r' on windows:
C:\Python32>python
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.
>>> print(repr(input()))
test
'test\r'
>>>
This breaks code that expects the string to be stripped, e.g. 'pydoc.py -b' doesn't recognise its commands:
C:\Python32>python lib\pydoc.py -b
Server ready at http://localhost:4680/
Server commands: [b]rowser, [q]uit
server> q
Server commands: [b]rowser, [q]uit
server> b
Server commands: [b]rowser, [q]uit
server> |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年02月21日 15:48:25 | duncanb | set | recipients:
+ duncanb |
| 2011年02月21日 15:48:24 | duncanb | set | messageid: <1298303304.94.0.0754812016321.issue11272@psf.upfronthosting.co.za> |
| 2011年02月21日 15:48:24 | duncanb | link | issue11272 messages |
| 2011年02月21日 15:48:23 | duncanb | create |
|