On Fri, 22 Oct 2010 17:37:53 +0200 Stefan Behnel <stefan...@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. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com