[docs] [issue11312] Confusing sentence in file.readline() doc

Ville Skyttä report at bugs.python.org
Thu Feb 24 22:41:48 CET 2011


New submission from Ville Skyttä <ville.skytta at iki.fi>:

http://docs.python.org/library/stdtypes.html#file.readline

"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.

----------
assignee: docs at python
components: Documentation
messages: 129316
nosy: docs at python, scop
priority: normal
severity: normal
status: open
title: Confusing sentence in file.readline() doc
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11312>
_______________________________________


More information about the docs mailing list