[Python-Dev] Exception type on handling closed files

2005-12-11 Thread João Paulo Silva
Look: >>> a = file("dir/foo") >>> a.close() >>> a.read() Traceback (most recent call last): File "", 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: 26

Re: [Python-Dev] Deprecate __ private (was Re: PEP 8 updates/clarifications)

2005-12-11 Thread João Paulo Silva
Hi All, I think that a big problem is that there isn't an obvious way to say: self.a is part of the class interface, self.b isn't. Or: you can override self._c to do that. I believe we really need a way to do these things more clear. Currently we can use methods and properties, but even this is no

Re: [Python-Dev] Inconsistent behaviour in import/zipimport hooks

2005-11-11 Thread João Paulo Silva
Hi (first post here, note that English is not my native language), One thing we shoudn't forgot is that Osvaldo is porting Python to a plataform that has not so much disk space. He needs Python modules with just the essencial. I like ideias like __debug__ opcode, but in Osvaldo use case, there are