Status of side-effecting functions in python

Marko Rauhamaa marko at pacujo.net
Tue Oct 28 05:10:07 EDT 2014


Marko Rauhamaa <marko at pacujo.net>:

> Python's sockets and pipes don't have write methods.

Actually, that's mistaken as well. The sys.std* handles and pipes
returned by subprocess are accessed using file.write() and thus may
return partial writes.

That brings up another point: Python3's file.write() returns the number
of characters written. What might it return if a partial character
should be written?


Marko



More information about the Python-list mailing list