Skip to content

Commit 3d57f45

Browse files
committed
Revert changes to BufferedReader.peek documentation
1 parent 07d9e4d commit 3d57f45

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

Doc/library/io.rst

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -781,13 +781,8 @@ than raw I/O does.
781781

782782
.. method:: peek(size=0, /)
783783

784-
Return bytes from the current position onwards without advancing the position.
785-
At least one byte of data is returned if not at EOF.
786-
Return an empty :class:`bytes` object at EOF.
787-
At most one single read on the underlying raw stream is done to satisfy the call.
788-
The *size* argument is ignored.
789-
The number of read bytes depends on the buffer size and the current position in the internal buffer.
790-
If the underlying raw
784+
Return bytes from the stream without advancing the position. The number of
785+
bytes returned may be less or more than requested. If the underlying raw
791786
stream is non-blocking and the operation would block, returns empty bytes.
792787

793788
.. method:: read(size=-1, /)

0 commit comments

Comments
 (0)