Richard Oudkerk added the comment:

> Things should be better in the future, when modules are cleared with true 
> garbage collection.

When is this future of which you speak?

I am not sure whether it would affect performance, but a weakrefable subclass 
of dict could be used for module dicts.  Then the module destructor could just 
save the module's dict in a WeakValueDictionary keyed by the id (assuming we 
are not yet shutting down).  At shutdown the saved module dicts could be purged 
by replacing all values with None.

Or maybe something similar is possible without using a dict subclass.

----------
versions: +Python 2.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16718>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to