Message182437
| Author |
barry |
| Recipients |
Arfrever, asvetlov, barry, brett.cannon, chris.jerdonek, cvrebert, eric.snow, ezio.melotti, pitrou, serhiy.storchaka |
| Date |
2013年02月19日.21:56:19 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<20130219165616.67b577c1@anarchist.wooz.org> |
| In-reply-to |
<1361303378.21.0.285956953726.issue15767@psf.upfronthosting.co.za> |
| Content |
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). |
|