]> granicus.if.org Git - python/commitdiff
document IOBase.__del__'s behavior (closes #21764)
authorBenjamin Peterson <benjamin@python.org>
Sun, 15 Jun 2014 01:51:34 +0000 (18:51 -0700)
committerBenjamin Peterson <benjamin@python.org>
Sun, 15 Jun 2014 01:51:34 +0000 (18:51 -0700)
Patch from Nikolaus Rath.

Doc/library/io.rst

index be208847da5eb70867f36b2e6152d690b2b28639..7b400858668fe186c678c022231dfb25fbf27099 100644 (file)
@@ -346,6 +346,12 @@ I/O Base Classes
       is usual for each of the lines provided to have a line separator at the
       end.
 
+   .. method:: __del__()
+
+      Prepare for object destruction. :class:`IOBase` provides a default
+      implementation of this method that calls the instance's
+      :meth:`~IOBase.close` method.
+
 
 .. class:: RawIOBase