Antoine Pitrou added the comment:
Ah, well. This is already fixed, then:
Python 3.4.0a0 (default:ae769deb45b2, Jul 20 2013, 19:28:41)
[GCC 4.7.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import io
>>> raw = io.BytesIO(bytes(200))
>>> buffered = io.BufferedReader(raw, 10)
>>> while True:
... buf = buffered.read1(20)
... print("Got %d bytes" % len(buf))
... if not buf:
... break
...
Got 20 bytes
Got 20 bytes
Got 20 bytes
Got 20 bytes
Got 20 bytes
Got 20 bytes
Got 20 bytes
Got 20 bytes
Got 20 bytes
Got 20 bytes
Got 0 bytes
However, 3.2 didn't get that improvement, sorry. See changeset 27bf3d0b8e5f and
issue #13393.
----------
resolution: -> duplicate
status: open -> closed
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue18524>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com