From 322656596abfd772b0573731a78676f4a16f2d34 Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Thu, 20 Nov 2008 23:34:31 +0000 Subject: Fixed issue #4233. Changed semantic of _fileio.FileIO's close() method on file objects with closefd=False. The file descriptor is still kept open but the file object behaves like a closed file. The FileIO object also got a new readonly attribute closefd. Approved by Barry Backport of r67106 from the py3k branch --- Doc/library/io.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Doc') diff --git a/Doc/library/io.rst b/Doc/library/io.rst index 18df0e0514..25d5f16dba 100644 --- a/Doc/library/io.rst +++ b/Doc/library/io.rst @@ -214,8 +214,10 @@ I/O Base Classes .. method:: close() - Flush and close this stream. This method has no effect if the file is - already closed. + 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. .. attribute:: closed -- cgit v1.2.1