[issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed
Brett Cannon
report at bugs.python.org
Wed Jul 17 18:20:59 EDT 2019
Brett Cannon <brett at python.org> added the comment:
If you're using your example code for 'testext' that you uploaded then that's expected because the import in your package causes a normal import which means the import machinery is adding things to sys.modules. Try it with a plain module that's empty so you don't have any other imports as a side-effect of imports and you will see the module isn't added to sys.modules.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37521>
_______________________________________
More information about the Python-bugs-list
mailing list