Skip to content

Commit 5fe5645

Browse files
committed
Make it more explicit that size is ignored
1 parent b6ffca8 commit 5fe5645

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/library/io.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,8 +785,9 @@ than raw I/O does.
785785
At least one byte of data is returned if not at EOF.
786786
Return an empty :class:`bytes` object at EOF.
787787
At most one single read on the underlying raw stream is done to satisfy the call.
788-
The exact number of bytes returned is unspecified
789-
(*size* is ignored). If the underlying raw
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
790791
stream is non-blocking and the operation would block, returns empty bytes.
791792

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

0 commit comments

Comments
 (0)