Ronald Oussoren <[email protected]> added the comment:
Note that importlib.import_module, and the import statement itself, can raise
an arbitrary exception when that exception is raised while executing the module
body.
This is easily observed by creating a module that just raises an error in its
body:
# t.py
1/0
# EOF
``importlib.import_module("t")`` will raise ZeroDivisionError.
----------
nosy: +ronaldoussoren
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue40899>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com