David-Sarah Hopwood <david-sa...@jacaranda.org> added the comment:

I wrote:
> A similar issue arises for stdin: to maintain strict compatibility, every 
> read from a TextIOWrapper attached to an input console would have to drain 
> the buffer of its buffer object, in case the app has read from it. This is a 
> bit tricky because the bytes drained from the buffer have to be converted to 
> Unicode, so what happens if they end part-way through a multibyte character? 
> Ugh, I'll have to think about that one.

It seems like there is no correct way for an app to read from both sys.stdin, 
and sys.stdin.buffer (even without these console changes). It must choose one 
or the other.

----------

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

Reply via email to