[Python-Dev] Raw I/O writelines() broken

Andrea Griffini agriff at tin.it
Tue Aug 21 02:39:52 CEST 2012


On Mon, Aug 20, 2012 at 11:42 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
>> In the spirit of RawIO.write(), I think RawIO.writelines() could return
>> the number of bytes written (allowing for partial writes).

When dealing with a non-blocking IO what you normally do is use number
returned from the write call to make next call and try to write the
remaining part.

How is this supposed to work with writelines? What is the caller supposed to do?


More information about the Python-Dev mailing list