Re: pep 3116 behaviour on non-blocking reads

2007-08-10 Thread greg
Antoon Pardon wrote: > I would like the developers to reconsider and return 0 bytes when no > bytes are available and let None indicate end of file. That would be a major departure from the way IO has always been handled before in Python, which follows the Unix model. Also, only code that deals w

pep 3116 behaviour on non-blocking reads

2007-08-09 Thread Antoon Pardon
In the RawIOBase class I read the following: .read(n: int) -> bytes Read up to n bytes from the object and return them. Fewer than n bytes may be returned if the operating system call returns fewer than n bytes. If 0 bytes are returned, this indicates end of file. If the object is