Destructors and exceptions

Bernhard Herzog bh at intevation.de
Wed Jun 9 07:58:01 EDT 2004


kveretennicov at yahoo.com (Konstantin Veretennicov) writes:

> "Humpty Dumpty" <oliver.schoenborn at utoronto.ca> wrote in message news:<Ysaxc.19793$sS2.682217 at news20.bellglobal.com>...
>> 
>> 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"?

http://python.org/peps/pep-0310.html

  Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Skencil                                http://sketch.sourceforge.net/
Thuban                                  http://thuban.intevation.org/



More information about the Python-list mailing list