[Python-Dev] Problem between deallocation of modules and func_globals

"Martin v. Löwis" martin at v.loewis.de
Fri Jan 19 04:20:04 CET 2007


Josiah Carlson schrieb:
> Seems to me like a bug, but the bug could be fixed if the module's
> dictionary kept a (circular) reference to the module object.  Who else
> has been waiting for a __module__ attribute?

This is the time machine at work:

py> import encodings
py> encodings.search_function.__module__
'encodings'

It's a string, rather than the module object, precisely to avoid cyclic
references.

Regards,
Martin


More information about the Python-Dev mailing list