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/2010-October/104837.html below:

[Python-Dev] SVN rev. 85392 broke module handling in py3k

[Python-Dev] SVN rev. 85392 broke module handling in py3k [Python-Dev] SVN rev. 85392 broke module handling in py3kAntoine Pitrou solipsis at pitrou.net
Fri Oct 22 18:17:55 CEST 2010
On Fri, 22 Oct 2010 17:37:53 +0200
Stefan Behnel <stefan_ml at behnel.de> wrote:
> 
> I think the general problem is that "the module" can be a pretty broad 
> thing, potentially referring to all sorts of stuff such as (usually) 
> several other modules.

I wouldn't think of unloading modules as a general problem. We should
support it for various reasons (including your use case), but if it
takes a further garbage collection pass to get rid of all stale
objects, then so be it.

> It would also mean that each and every function will end up in a reference 
> cycle by default that will require garbage collection for cleanup.

This is already the case, since most functions are in a reference cycle
with their own globals dict (== module dict). It's just that the
reference cycle would then include the module object as well, but I
don't see it as a big drawback. The module object holds little to no
state except its dict, precisely.

Regards

Antoine.


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