STINNER Victor <victor.stin...@gmail.com> added the comment: Serhiy: "(...) I think it is more correct to say that stdin is always unbuffered in Python 3."
I disagree. Technically, sys.stdin.read(1) reads up to 1024 bytes from the file descriptor 0. For me, "unbuffered read" means that read(1) reads a single byte. Expected behaviour of an fully unbuffered stdin: assert sys.stdin.read(1) == 'a' assert os.read(0, 1) == b'b' The program should not fail with an assertion error nor block if you write 'ab' characters into stdin. ---------- _______________________________________ 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