Message192201
| Author |
brett.cannon |
| Recipients |
Arfrever, Guido.van.Rossum, asvetlov, barry, brett.cannon, chris.jerdonek, cvrebert, eric.snow, ezio.melotti, gvanrossum, pitrou, python-dev, serhiy.storchaka, theller |
| Date |
2013年07月02日.14:59:03 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1372777143.99.0.886696155706.issue15767@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
In this instance where there are only a set number of options are expected to be officially valid, yes I think enums are a good fit.
As for strings, the only way I would be okay with that is defining the strings either as attributes on ImportError itself or off of importlib to make it easy to do a comparison. But in that case I might as well just drop _not_found and use ``str(exc).startswith('No module named ')`` to detect what I need and be done with it. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年07月02日 14:59:04 | brett.cannon | set | recipients:
+ brett.cannon, gvanrossum, barry, theller, pitrou, ezio.melotti, Arfrever, cvrebert, asvetlov, chris.jerdonek, python-dev, eric.snow, serhiy.storchaka, Guido.van.Rossum |
| 2013年07月02日 14:59:03 | brett.cannon | set | messageid: <1372777143.99.0.886696155706.issue15767@psf.upfronthosting.co.za> |
| 2013年07月02日 14:59:03 | brett.cannon | link | issue15767 messages |
| 2013年07月02日 14:59:03 | brett.cannon | create |
|