Eric Cousineau <eric.cousineau@tri.global> added the comment: > P.S. This issue points out once again why it is generally a bad idea to > shadow or mix-and-match standard library module names.
Duly noted! And thank y'all for the explanations! Can I ask if it's bad practice to use a standard library module name as a submodule, e.g. `example_module.math`? TBH, this all arises because we use Bazel and wanted to modularize our tests - we place them under `test/{name}.py` neighboring the target (sub)module, and Bazel presently generates a wrapper script which is executed in the same directory as the (sub)module, which is why this (unintended) shadowing occurs. I would like still like to have a submodule named `math`, so I can just teach our Bazel rules to not run the test in the same directory -- if having submodules named `math` is not frowned upon. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32845> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com