]> granicus.if.org Git - python/commitdiff
clarify condition for readline to return EOF (closes #11312)
authorBenjamin Peterson <benjamin@python.org>
Sat, 12 Mar 2011 23:12:54 +0000 (17:12 -0600)
committerBenjamin Peterson <benjamin@python.org>
Sat, 12 Mar 2011 23:12:54 +0000 (17:12 -0600)
Doc/library/stdtypes.rst

index b532285f6486eac9b40f82841f1a8ba514874800..77c2da7e662a2e0cadcf121cf080cbda3805ecd9 100644 (file)
@@ -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::