[issue46935] import of submodule polutes global namespace
Max Bachmann
report at bugs.python.org
Sat Mar 5 18:10:53 EST 2022
Max Bachmann <kontakt at maxbachmann.de> added the comment:
It appears this only occurs when a C Extension is involved. When the so is imported first it is preferred over the .py file that the user would like to import. I could not find any documentation on this behavior, so I assume that this is not the intended.
My current workaround is the usage of a unique name for the C Extension and the importing everything from a Python file with the corresponding name.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46935>
_______________________________________
More information about the Python-bugs-list
mailing list