On Mon, Jul 28, 2008 at 11:45 AM, Antoine Pitrou <[EMAIL PROTECTED]> wrote: > There is an uncertainty in the signature for RawIOBase.read(). > PEP 3116 says: > read(n: int) -> bytes > > but current io.py says: > def read(self, n: int = -1) -> bytes: > > Is omitting the `n` parameter always supported by RawIOBase implementations? > (meaning: read up to the end)
In this (and many other) cases I consider io.py to be more correct; I haven't kept the PEP up to date. Note that None and any negative value should be treated the same way. Zero OTOH should mean "read nothing". -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com