21.08.20 18:22, Greg Ewing пише: > Maybe check whether the module being imported from is shadowing another > module further along the search path and warn about that?
It would have non-zero cost. There is a common idiom: try: from foo import bar except ImportError: def bar(): ... In this case you would need to try importing foo from other locations. And what if some improved version intentionally hides the old one? You could end with two imported modules with the same name. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/AJZTX47QYCNBQLYIL54NFZUVRFNCO5FI/ Code of Conduct: http://python.org/psf/codeofconduct/