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 -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/AJZTX47QYCNBQLYIL54NFZUVRFNCO5FI/
Code of Conduct: http://python.org/psf/codeofconduct/