Skip to content

Commit

Permalink
file.write() may return something with the new IO framework.
Browse files Browse the repository at this point in the history
  • Loading branch information
birkenfeld committed Mar 21, 2008
1 parent 02781dc commit 3888980
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3888980

Please sign in to comment.