A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-June/045351.html below:

[Python-Dev] Re: Object finalization for local (ie function)scopes

[Python-Dev] Re: Object finalization for local (ie function)scopes [Python-Dev] Re: Object finalization for local (ie function)scopes"Martin v. Löwis" martin at v.loewis.de
Sun Jun 13 04:02:13 EDT 2004
Oliver Schoenborn wrote:
> Those objects that have "registered" themselves to the "cleaner" require
> finally-ization. Hence, if no objects registered themselves, there is only
> the overhead of an empty finally. The implementation details can worry about
> how registration takes place, and who does the cleanup. In scope.py,
> "registration" is handled by derivation from class NeedsFinalization -- 
> which I can eventually rename so please let's not get stuck on terminology
> at this stage. The cleaner is a function called ScopeGuardian.

I'm still uncertain, though, as to what objects precisely should get
the cleanup calls: *All* objects that have registered with the cleaner,
or only some of them?

If all objects: what if nested function calls each have to-clean 
objects, and only the inner function returns? Why is it then useful
to also clean objects that where created in an outer function?

If only some objects: which ones?

Regards,
Martin


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4