[Python-Dev] Exception type on handling closed files (original) (raw)
João Paulo Silva s.joaopaulo at gmail.com
Mon Dec 12 05:31:45 CET 2005
- Previous message: [Python-Dev] Deprecate __ private (was Re: PEP 8 updates/clarifications)
- Next message: [Python-Dev] Exception type on handling closed files
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Look:
a = file("dir/foo") a.close() a.read()
Traceback (most recent call last): File "<pyshell#28>", line 1, in -toplevel- a.read() ValueError: I/O operation on closed file
Shoudn't this raise IOError? Seems more semantically correct to me.
-- João Paulo da Silva LinuxUser #355914 ICQ: 265770691 | Jabber: joaopinga at jabber.org
- Previous message: [Python-Dev] Deprecate __ private (was Re: PEP 8 updates/clarifications)
- Next message: [Python-Dev] Exception type on handling closed files
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]