tkhyn added the comment: Ok, thanks for the reply. Actually the thing that bothered me was the AttributeError exception. I would probably not have opened a ticket should find_spec have raised a ModuleNotFoundError (in line with import_module).
Would you consider catching the AttributeError (which means detecting if parent_name relates to a package) to raise a ModuleNotFoundError instead more appropriate? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30436> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com