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 Eric Cousineau
Recipients Eric Cousineau, eric.smith, ned.deily, ronaldoussoren
Date 2018-02-15.15:22:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1518708159.88.0.467229070634.issue32845@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2018-02-15 15:22:39Eric Cousineausetrecipients: + Eric Cousineau, ronaldoussoren, eric.smith, ned.deily
2018-02-15 15:22:39Eric Cousineausetmessageid: <1518708159.88.0.467229070634.issue32845@psf.upfronthosting.co.za>
2018-02-15 15:22:39Eric Cousineaulinkissue32845 messages
2018-02-15 15:22:39Eric Cousineaucreate