[issue5811] io.BufferedReader.peek(): Documentation differs from Implementation
Lucas Prado Melo
report at bugs.python.org
Mon Jun 15 07:21:11 CEST 2009
Lucas Prado Melo <lukepadawan at gmail.com> added the comment:
Here is a patch that passes all the tests (I had to change some of them
though, they were expecting erroneous behaviours IMHO).
The biggest problem was the read1 testing, I've tried to get the maximum
of bytes less than or equal to what the user wanted while executing at
most 1 raw_read()'s.
I have created a new test for peek()'ing a number of bytes bigger than
could possibly be stored on the buffer.
Added file: http://bugs.python.org/file14304/peek3.diff
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list