[issue2439] Patch to add a get_data function to pkgutil

Nick Coghlan report at bugs.python.org
Fri Mar 21 05:49:33 CET 2008


Nick Coghlan <ncoghlan at gmail.com> added the comment:

To clarify the intent of the section of PEP 302 Paul quoted: the
*module* object gets reused, but the contents of mod.__dict__ are
clobbered and the module code re-executed.

So it's the same module object, but with brand new contents (this is why
"from foo import bar" and "reload(foo)" do not play nicely with each
other, but doing "import foo" and then invoking "foo.bar" picks up the
new version of "bar" after a reload).

----------
nosy: +ncoghlan

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2439>
__________________________________


More information about the Python-bugs-list mailing list