On Wed, Mar 14, 2018 at 04:20:20PM +1100, Chris Billington wrote: > Instead, maybe a user should just get a big fat error if they try to import > the same file twice under different names.
Absolutely not. Suppose I import a library, Spam, which does "import numpy". Now I try to "import numpy as np", and I get an error. Besides, there is no reason why I shouldn't be able to import Spam import Spam as spam import Spam as Ham *even in the same script* if I so choose. It's not an error or a mistake to have multiple names for a single object. > I wonder if there's any reason something like this shouldn't be built into > Python's default import system. Wrong question. The question should not be "Why shouldn't we do this?" but "why should we do this?". -- Steve _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/