[Python-ideas] Disallow importing the same module under multiple names
Steven D'Aprano
steve at pearwood.info
Tue Mar 20 05:06:00 EDT 2018
On Wed, Mar 14, 2018 at 12:09:55PM -0700, Guido van Rossum wrote:
> Yeah, one should never add a module to sys.path that has a __init__.py file.
Should import raise a warning in that case?
I wouldn't want an outright error. I've cd'ed into a package directory
in the shell, then run a python module from that directory too many
times to want an exception, but I wouldn't mind a warning.
--
Steve
More information about the Python-ideas
mailing list