
Aug. 21, 2020
11:52 p.m.
On 22/08/20 6:43 am, Serhiy Storchaka wrote:
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.
I wouldn't suggest going that far. The ImportError should always happen as before, just with a different error message. This case would still fail in an obscure way, but I don't think much can be done about that. -- Greg