[Python-3000] print() flushing problem.
wojtek.gminick.walczak at gmail.com
Wed Nov 7 13:59:35 CET 2007
py3k's print() is not flushing when end is set to '' and all it has to
print is one-character-long string:
Python 3.0a1 (py3k, Nov 6 2007, 19:25:33)
[GCC 4.1.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
It works OK, when string is longer than 1:
When end is not set at all, it is flushing allright, because print()
prints '\n' at the end:
What's even stranger - it's sensitive for spaces (or it's just coincidence)
in the strings:
>>> ret=[print(i,end='') for i in list('print is not flushing')]
print is not flushin>>>
>>>ret=[print(i,end='') for i in list('printisnotflushing')]
>>> for i in list('print is not flushing'):
print is not flushin[3.0a1]>>> print()
>>> for i in list('printisnotflushing'):
My proposition of patch is in the attachment, but I think that the
problem lies somewhere deeper.
I was testing both bug and patch on Slack 12 and Debian Etch.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 805 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-3000/attachments/20071107/43c5b408/attachment.obj
More information about the Python-3000