[issue12554] Failed imports clean up module, but not sub modules
Eric Snow
report at bugs.python.org
Thu Jul 14 05:20:15 CEST 2011
Eric Snow <ericsnowcurrently at gmail.com> added the comment:
Yeah, I missed the line where he imported foo.bar in "foo/__init__.py", and thought something else was going on.
"foo/__init__.py" does not have to finish importing (just has to be on sys.modules) at the point foo.bar is imported. So foo.bar would be completely imported before the "1/0" expression was evaluated, and you are exactly right, David.
Sorry for adding to the confusion.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12554>
_______________________________________
More information about the Python-bugs-list
mailing list