]> 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 79f65e00071f5aecc935b80aba015ce489dcd183..0c7d3c7f6b0e05de92996cec148bf20467750164 100644 (file)
@@ -353,6 +353,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