diff options
author | Christian Heimes <christian@cheimes.de> | 2008-11-05 19:30:32 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-11-05 19:30:32 (GMT) |
commit | ecc42a2b82858763818484572dccc7e88a3bdda1 (patch) | |
tree | a8bad97b03850ab5ccbe33e14332e4840b409816 /Doc/library/io.rst | |
parent | b37509b11b34fb4b2045162b88d4fa110cd4692b (diff) | |
download | cpython-ecc42a2b82858763818484572dccc7e88a3bdda1.zip cpython-ecc42a2b82858763818484572dccc7e88a3bdda1.tar.gz cpython-ecc42a2b82858763818484572dccc7e88a3bdda1.tar.bz2 |
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
Diffstat (limited to 'Doc/library/io.rst')
-rw-r--r-- | Doc/library/io.rst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/library/io.rst b/Doc/library/io.rst index 543bb37..14f7506 100644 --- a/Doc/library/io.rst +++ b/Doc/library/io.rst @@ -213,8 +213,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 |