]> granicus.if.org Git - python/commitdiff
Clarify and fix the documentation for IOBase.close()
authorAntoine Pitrou <solipsis@pitrou.net>
Wed, 28 Apr 2010 19:57:33 +0000 (19:57 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Wed, 28 Apr 2010 19:57:33 +0000 (19:57 +0000)
Doc/library/io.rst

index 9f08c25219c32c50fd3ddae460364af953981711..4554b1ef9a3b37f0f7392c9ca1c7af46b320580e 100644 (file)
@@ -246,8 +246,10 @@ I/O Base Classes
 
       Flush and close this stream. This method has no effect if the file is
       already closed. Once the file is closed, any operation on the file
-      (e.g. reading or writing) will raise an :exc:`IOError`. The internal
-      file descriptor isn't closed if *closefd* was False.
+      (e.g. reading or writing) will raise an :exc:`ValueError`.
+
+      As a convenience, it is allowed to call this method more than once;
+      only the first call, however, will have an effect.
 
    .. attribute:: closed