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
_______________________________________________
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/YRGJ53EOB7MZHOT7VRNZIHVFNPHUI6J3/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to