This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients Rolf Campbell, brett.cannon, eric.snow, ncoghlan, r.david.murray
Date 2018-05-25.13:55:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1527256524.11.0.682650639539.issue33547@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2018-05-25 13:55:24ncoghlansetrecipients: + ncoghlan, brett.cannon, r.david.murray, eric.snow, Rolf Campbell
2018-05-25 13:55:24ncoghlansetmessageid: <1527256524.11.0.682650639539.issue33547@psf.upfronthosting.co.za>
2018-05-25 13:55:24ncoghlanlinkissue33547 messages
2018-05-25 13:55:24ncoghlancreate