Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

In Python 2 there is an internal buffering in xreadlines(), readlines() and 
file-object iterators. You need to enter many lines first that the program get 
the first of them. And -u doesn't help.

But in Python 3 the program gets the input right as it becomes available. 
Reading is not blocked if the input is available. There are internal buffers, 
but they affect only performance, not the behavior. If you can edit a line 
before pressing Enter, this is because your terminal buffers a line before 
sending it to the program. I think it is more correct to say that stdin is 
always unbuffered in Python 3.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue28647>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to