Message192201
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. |
|
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 | |
|