Message182437
On Feb 19, 2013, at 07:49 PM, Brett Cannon wrote:
>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).
The difference being that checking errno on OSError/IOError is essentially
required to do anything useful with it, while this one seems like a rare
corner case (we've been doing pretty well without it so far). |
|
Date |
User |
Action |
Args |
2013-02-19 21:56:19 | barry | set | recipients:
+ barry, brett.cannon, pitrou, ezio.melotti, Arfrever, cvrebert, asvetlov, chris.jerdonek, eric.snow, serhiy.storchaka |
2013-02-19 21:56:19 | barry | link | issue15767 messages |
2013-02-19 21:56:19 | barry | create | |
|