[issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed
Benjamin Mintz
report at bugs.python.org
Wed Jul 17 13:41:27 EDT 2019
Benjamin Mintz <benjabean1 at gmail.com> added the comment:
```
name = 'testext'
spec = importlib.util.find_spec(name)
print(name in sys.modules)
module = importlib.util.module_from_spec(spec)
print(name in sys.modules)
spec.loader.exec_module(module)
print(name in sys.modules)
```
This prints False, False, True though.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37521>
_______________________________________
More information about the Python-bugs-list
mailing list