New submission from Ville Skyttä <ville.sky...@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@python
components: Documentation
messages: 129316
nosy: docs@python, scop
priority: normal
severity: normal
status: open
title: Confusing sentence in file.readline() doc
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11312>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to