Re: Semantic of operations on a closed file object

2009-12-26 Thread Antoine Pitrou
Hello, > But the io.IOBase.close() method document says: """Once the file is > closed, any operation on the file (e.g. reading or writing) will raise > an IOError .""" which unlike the > class doc is not conditional about the behavior... > > Experimentation (see below) show that I get a ValueErr

Semantic of operations on a closed file object

2009-12-26 Thread Baptiste Lepilleur
Reading python io.IOBase class documentation, I'm kind of confused at the expected behavior of operation on a closed file object. The io.IOBase class doc says: """Note that calling any method (even inquiries) on a closed stream is undefined. Implementations may raise IOErrorin this case.""" But t