[Python-checkins] cpython (2.7): clarify condition for readline to return EOF (closes #11312)

benjamin.peterson python-checkins at python.org
Sun Mar 13 00:11:28 CET 2011


http://hg.python.org/cpython/rev/c017695acf19
changeset: 68409:c017695acf19
branch: 2.7
user: Benjamin Peterson <benjamin at python.org>
date: Sat Mar 12 17:12:54 2011 -0600
summary:
 clarify condition for readline to return EOF (closes #11312)
files:
 Doc/library/stdtypes.rst
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -2388,11 +2388,12 @@
 
 .. 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::
 
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /