A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2009-October/093040.html below:

[Python-Dev] Better module shutdown procedure

[Python-Dev] Better module shutdown procedure [Python-Dev] Better module shutdown procedureAntoine Pitrou solipsis at pitrou.net
Thu Oct 15 14:42:51 CEST 2009
Le Wed, 14 Oct 2009 18:27:37 -0500, Daniel Stutzbach a écrit :
> 
> Here is my understanding of the proposed procedure:
> 
> 1. Replace modules in sys.modules with weakrefs 2. Run the garbage
> collector
> 3. Replace globals in any remaining modules with None 4. Run the garbage
> collector
> 
> Is it possible for a __del__ method to be called in step 4 or not?  I am
> still unclear on this point. :-)

If an object is holding a reference to a module (e.g. self._sys = sys), 
then yes it should be possible because the reference has been creating a 
cycle.


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