summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-03-12 23:12:54 (GMT)
committerBenjamin Peterson <benjamin@python.org>2011-03-12 23:12:54 (GMT)
commit4f1a665faec81725bae335ba1d995e18a29383ea (patch)
tree10b79d6fcf0e0d940fd5ad4f000210fc10f17e3b
parent5ddf51f73587fdd8348f1def87f8cf53aed0dd8e (diff)
downloadcpython-4f1a665faec81725bae335ba1d995e18a29383ea.zip
cpython-4f1a665faec81725bae335ba1d995e18a29383ea.tar.gz
cpython-4f1a665faec81725bae335ba1d995e18a29383ea.tar.bz2
clarify condition for readline to return EOF (closes #11312)
-rw-r--r--Doc/library/stdtypes.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index b532285..77c2da7 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -2388,11 +2388,12 @@ Files have the following methods:
.. method:: file.readline([size])
- Read one entire line from the file. A trailing newline character is kept in the
- string (but may be absent when a file ends with an incomplete line). [#]_ If
- the *size* argument is present and non-negative, it is a maximum byte count
- (including the trailing newline) and an incomplete line may be returned. An
- empty string is returned *only* when EOF is encountered immediately.
+ Read one entire line from the file. A trailing newline character is kept in
+ the string (but may be absent when a file ends with an incomplete line). [#]_
+ If the *size* argument is present and non-negative, it is a maximum byte
+ count (including the trailing newline) and an incomplete line may be
+ returned. When *size* is not 0, an empty string is returned *only* when EOF
+ is encountered immediately.
.. note::