Nick Coghlan <ncogh...@gmail.com> added the comment: Not as a statement, but you can force it with importlib.import_module:
$ python3 -c "import pkg; pkg.submodule = 1; import importlib; importlib.import_module('.submodule', 'pkg'); print(pkg.submodule)" pkg pkg.submodule <module 'pkg.submodule' from '/home/ncoghlan/devel/misc/_play/pkg/submodule.py'> We're getting off-topic for the issue tracker now, though - it's more a Stack Overflow type usage question (and the preferred answer would be to eliminate whatever's causing the shadowing problem in the originating module). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33547> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com