This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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:04brett.cannonsetrecipients: + 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:03brett.cannonsetmessageid: <1372777143.99.0.886696155706.issue15767@psf.upfronthosting.co.za>
2013-07-02 14:59:03brett.cannonlinkissue15767 messages
2013-07-02 14:59:03brett.cannoncreate