[Python-checkins] r75169 - in python/branches/release31-maint: Doc/library/io.rst
antoine.pitrou
python-checkins at python.org
Thu Oct 1 18:27:13 CEST 2009
Author: antoine.pitrou
Date: Thu Oct 1 18:27:13 2009
New Revision: 75169
Log:
Merged revisions 75168 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r75168 | antoine.pitrou | 2009-10-01 18:24:45 +0200 (jeu., 01 oct. 2009) | 3 lines
Issue #7022: clarification of RawIOBase.read(), suggested by Pascal Chambon.
........
Modified:
python/branches/release31-maint/ (props changed)
python/branches/release31-maint/Doc/library/io.rst
Modified: python/branches/release31-maint/Doc/library/io.rst
==============================================================================
--- python/branches/release31-maint/Doc/library/io.rst (original)
+++ python/branches/release31-maint/Doc/library/io.rst Thu Oct 1 18:27:13 2009
@@ -326,11 +326,14 @@
.. method:: read(n=-1)
- Read and return up to *n* bytes from the stream. As a convenience, if
- *n* is unspecified or -1, :meth:`readall` is called. Otherwise,
- only one system call is ever made. An empty bytes object is returned
- on EOF; ``None`` is returned if the object is set not to block and has
- no data to read.
+ Read up to *n* bytes from the object and return them. As a convenience,
+ if *n* is unspecified or -1, :meth:`readall` is called. Otherwise,
+ only one system call is ever made. Fewer than *n* bytes may be
+ returned if the operating system call returns fewer than *n* bytes.
+
+ If 0 bytes are returned, and *n* was not 0, this indicates end of file.
+ If the object is in non-blocking mode and no bytes are available,
+ ``None`` is returned.
.. method:: readall()
More information about the Python-checkins
mailing list