R. David Murray added the comment:

I'm not sure what Serhiy means by "is blocked", but the second half makes 
sense: readline(0) on a file will return the empty string, but here it will 
read one character and return it.  Like he says, it doesn't break anything in 
the context of this bug fix, but it is an API bug.  Unless I'm missing 
something his replacement also has a bug, though: it won't add the \n to the 
returned string.

A minimal fix for the API bug would be to extend the 'if size' with an elif for 
0 that returns the empty string.

----------

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

Reply via email to