Proposal: local variable declarations and type advice

Jeff Shannon jeff at ccvcorp.com
Wed Feb 27 15:01:48 EST 2002


Paul Rubin wrote:

> Also, there's no way to make sure that the "del temp" at the end of
> a block actually gets run, unless you put try...finally around it,
> which is a big mess.

I may be in way out of my depth here, but I don't think that this is true.  If
you explicitly delete an object, then that name should be guaranteed to be
unbound.  What's *not* guaranteed, is whether or not an unreferenced object's
__del__() method gets called -- the object may still exist in memory,
unreachable, somewhere.  However, that name is *not* going to reference it
properly.

At least, that's my understanding of it.

Jeff Shannon
Technician/Programmer
Credit International





More information about the Python-list mailing list