while c = f.read(1)
rafi
rafi at free.fr
Tue Aug 23 07:58:17 EDT 2005
Antoon Pardon wrote:
> In that case you wouldn't return an empty sequence if you wanted
> a false value in a sequence context but would throw an exception.
> So this would be fine by me, I just don't understand how this
> would support the use of empty sequences as false.
>
> I also don't see how a read from a network connection returning
> either:
>
> a bytestring when data is available,
> '' when no data is available
> None when the connection was closed
I do not get why returning '' when no data is available? If no data is
available then nothing is returned, the function hangs. (Which is the
cas for receive)
--
rafi
"Imagination is more important than knowledge."
(Albert Einstein)
More information about the Python-list
mailing list