Scope of instantiated class

Peter Hansen peter at engcorp.com
Sun Jul 21 20:19:12 EDT 2002


Alex Martelli wrote:
> 
> > the name you use is local to the function, then when
> > the function exits the binding is removed and the object,
> > if no other names are by now bound to it, is destroyed.
> 
> Yes, except that 'names' must be used in a very wide
> sense here -- e.g., async.dispatcher instances are kept
> alive by references to them in the socket_map dict,
> which are "names" only in a very wide sense.

I'm trying to follow Aahz' advice and avoid "reference"
in favour of "binding" etc, but I guess I carried it too 
far!  :)

-new-habits-can-die-hard-too-ly yr's,
 Peter



More information about the Python-list mailing list