summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-03-21 19:42:31 (GMT)
committerGeorg Brandl <georg@python.org>2008-03-21 19:42:31 (GMT)
commit38889804086855d507ca5cfee187e8c91fc99379 (patch)
treefedb13c1cf9f66eb85a677c6530c77f3add127d1 /Doc/library
parent02781dc7541b79e499c06ead64535c317efc460e (diff)
downloadcpython-38889804086855d507ca5cfee187e8c91fc99379.zip
cpython-38889804086855d507ca5cfee187e8c91fc99379.tar.gz
cpython-38889804086855d507ca5cfee187e8c91fc99379.tar.bz2
file.write() may return something with the new IO framework.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/stdtypes.rst10
1 files changed, 7 insertions, 3 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index f06ca2c..18131b9 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -2055,9 +2055,13 @@ Files have the following methods:
.. method:: file.write(str)
- Write a string to the file. There is no return value. Due to buffering, the
- string may not actually show up in the file until the :meth:`flush` or
- :meth:`close` method is called.
+ Write a string to the file. Due to buffering, the string may not actually
+ show up in the file until the :meth:`flush` or :meth:`close` method is
+ called.
+
+ The meaning of the return value is not defined for every file-like object.
+ Some (mostly low-level) file-like objects may return the number of bytes
+ actually written, others return ``None``.
.. method:: file.writelines(sequence)