Title: Confusing sentence in file.readline() doc
Type: Stage:
Components: Documentation Versions: Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: benjamin.peterson, docs@python, scop
Priority: normal Keywords:

Created on 2011-02-24 21:41 by scop, last changed 2011-03-12 23:14 by benjamin.peterson. This issue is now closed.

Messages (2)
msg129316 - (view) Author: Ville Skyttä (scop) * Date: 2011-02-24 21:41

"An empty string is returned only when EOF is encountered immediately."

I think this sentence is misleading especially because the word "only" in it is emphasized, because an empty string is also returned when the size argument is 0 (except for StringIO but I think that's a bug, see #11311).  I suggest rephrasing it as:

"An empty string is returned only when EOF is encountered immediately or the size argument is zero."

...or just removing the sentence altogether.  Text before it already covers the size=0 case.
msg130707 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2011-03-12 23:14
Date User Action Args
2011-03-12 23:14:41benjamin.petersonsetstatus: open -> closed

nosy: + benjamin.peterson
messages: + msg130707

resolution: fixed
2011-02-24 21:41:43scopcreate