Message317673
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). |
|
Date |
User |
Action |
Args |
2018-05-25 13:55:24 | ncoghlan | set | recipients:
+ ncoghlan, brett.cannon, r.david.murray, eric.snow, Rolf Campbell |
2018-05-25 13:55:24 | ncoghlan | set | messageid: <1527256524.11.0.682650639539.issue33547@psf.upfronthosting.co.za> |
2018-05-25 13:55:24 | ncoghlan | link | issue33547 messages |
2018-05-25 13:55:24 | ncoghlan | create | |
|