Message129729
Catching ImportError in order to switch to an alternate implementation can mask real failures in imported modules. Attaching the module name as an attribute would allow this to be handled correctly by doing something like:
try:
import simplejson
except ImportError as err:
if err.module_name != 'simplejson':
raise
<backup plan>
See http://mail.python.org/pipermail/python-ideas/2011-February/009209.html |
|
Date |
User |
Action |
Args |
2011-02-28 22:30:45 | ncoghlan | set | recipients:
+ ncoghlan |
2011-02-28 22:30:45 | ncoghlan | set | messageid: <1298932245.21.0.726100579882.issue11356@psf.upfronthosting.co.za> |
2011-02-28 22:30:43 | ncoghlan | link | issue11356 messages |
2011-02-28 22:30:43 | ncoghlan | create | |
|