Destructors and exceptions

Bernhard Herzog bh at
Wed Jun 9 13:58:01 CEST 2004

kveretennicov at (Konstantin Veretennicov) writes:

> "Humpty Dumpty" <oliver.schoenborn at> wrote in message news:<Ysaxc.19793$sS2.682217 at>...
>> I agree, it is a real pitty that Python doesn't have a way of doing what you
>> mention, other than try-finally, which makes code more difficult to read. A
>> new specifier, e.g. "scoped", would be a required addtion to Python:
>> interpreter would garantee that __del__ of scoped objects would be called on
>> scope exit, and raise an exception if attempt to alias.
> Is there a PEP or something for "scoped specifier"?


Intevation GmbH                       

More information about the Python-list mailing list