[issue30431] input function truncates prompt by NULL byte
Terry J. Reedy
report at bugs.python.org
Sat May 27 10:31:30 EDT 2017
Terry J. Reedy added the comment:
As near as I can tell, the patch introduces a regression. The doc for input(prompt) says "If the prompt argument is present, it is written to standard output without a trailing newline." The handling of the prompt is up to stdout.write and thence physical displays devices. Python does not specify what happens with any particular character, including \r, \t, and astral chars.
C:\Users\Terry>python -c "import sys; sys.stdout.write('some\0 text\n')
some text
The bug on Windows is that input('some\0 text\n') does not produce the same display.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30431>
_______________________________________
More information about the Python-bugs-list
mailing list