deleting a parameter's name as it is passed to a function
Amir Michail
amichail at gmail.com
Fri Oct 14 20:59:21 EDT 2005
Paul Rubin wrote:
> "Amir Michail" <amichail at gmail.com> writes:
> > The idea is to garbage collect the object as soon as possible, and this
> > may be sooner than when dosomestuff returns.
>
> If it's a parameter to dosomestuff, then there's still a reference
> until dosomestuff returns. Simply getting rid of the name only frees
> a dictionary entry.
But dosomestuff can get rid of its reference before it returns (perhaps
it has a lot more to do before it returns and so you would want to
garbage collect the parameter object as soon as possible).
Amir
More information about the Python-list
mailing list