Message192202
> 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.
They are a good fit, that doesn't mean they're the only one.
> 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.
What does that mean?
I don't understand how `exc.reason == 'module_not_found'` is
harder than `exc.reason == ImportReason.MODULE_NOT_FOUND`. |
|
Date |
User |
Action |
Args |
2013-07-02 15:01:11 | pitrou | set | recipients:
+ pitrou, gvanrossum, barry, brett.cannon, theller, ezio.melotti, Arfrever, cvrebert, asvetlov, chris.jerdonek, python-dev, eric.snow, serhiy.storchaka, Guido.van.Rossum |
2013-07-02 15:01:11 | pitrou | link | issue15767 messages |
2013-07-02 15:01:11 | pitrou | create | |
|