
Aug. 21, 2020
6:43 p.m.
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.