From: Antoine Pitrou Date: Wed, 28 Apr 2010 19:57:33 +0000 (+0000) Subject: Clarify and fix the documentation for IOBase.close() X-Git-Tag: v2.7b2~152 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=689405ee14b5f33d4717b06d258e8dd4f5332f72;p=python Clarify and fix the documentation for IOBase.close() --- diff --git a/Doc/library/io.rst b/Doc/library/io.rst index 9f08c25219..4554b1ef9a 100644 --- a/Doc/library/io.rst +++ b/Doc/library/io.rst @@ -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