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 <rep...@bugs.python.org> <http://bugs.python.org/issue23214> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com