Brett Cannon added the comment:

Chris: Having a more generic name for import-from at the eval loop level on top 
of NoModuleFoundError is breaking the "practicality over purity" rule. 
ImportSearchFailed might be the closest we can come to a generic name for what 
occurred.

Serihy & Barry: no. We do that now and it's already a nasty little hack. It 
would be better to let people catch an exception signaling that an import 
didn't happen because some module is missing than require introspection on a 
caught ImportError to tell what is going on (there's a reason why Antoine went 
to all of that trouble to add new exceptions so we don't have to look at the 
errno attribute on OSError). Exceptions are structured to work off of 
inheritance hierarchies (says the man who co-wrote the PEP to make all PEPs 
inherit from BaseException).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15767>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to