[issue23214] BufferedReader.read1(size) signature incompatible with BufferedIOBase.read1(size=-1)

Martin Panter report at bugs.python.org
Sat Mar 19 02:32:07 EDT 2016


Martin Panter added the comment:

Okay here is a patch implementing read1(-1) in BufferedReader and BytesIO (my original proposal). Other changes:

* Changed read1(size=-1) → read1([size]), because BufferedReader and BytesIO do not accept keyword arguments (see also Issue 23738)
* Defined size=-1 to mean an arbitrary non-zero size
* Change BufferedReader.read1() to return a buffer of data
* Change BytesIO.read1() to read until EOF
* Add tests to complement existing read1(size) tests for BufferedReader (includes BufferedRandom), BufferedRWPair, and BytesIO

----------
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file42213/read1-arbitrary.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23214>
_______________________________________


More information about the Python-bugs-list mailing list