Nick Coghlan <ncogh...@gmail.com> added the comment: It's not the docstring that is wrong for the current behaviour, it's the IO.BufferedReader documentation:
""" peek([n]) Return 1 (or n if specified) bytes from a buffer without advancing the position. Only a single read on the raw stream is done to satisfy the call. The number of bytes returned may be less than requested since at most all the buffer’s bytes from the current position to the end are returned. """ That gives absolutely no indication that the call might return more bytes than expected, and the indication that leaving out the argument will return only the next byte is flat out wrong. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5811> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com