"tomer filiba" <[EMAIL PROTECTED]> writes:
> read(x) guarantees to return x bytes, or EOFError otherwise
> (and also restoing the stream position).
This is a poor choice of the fundamental operation. For example when
recoding bytes to characters, an analogous interface for a character
stream is inconvenient to implement in terms of this interface for
a byte stream. Ditto for transparent compression and decompression.
Most APIs are based on the Unix semantics of read (reading at most
the given count) and it should be the core. Reading exactly N bytes
can be implemented on top of that.
--
__("< Marcin Kowalczyk
\__/ [EMAIL PROTECTED]
^^ http://qrnik.knm.org.pl/~qrczak/
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com