Missing modules for python

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Mon Oct 11 19:02:42 EDT 2010


On Mon, 11 Oct 2010 10:32:44 -0400, Jed Smith wrote:

> simplejson got merged into the standard library in Python 2.6. In
> libcloud, I wrote this:
> 
>   try: import json
>   except ImportError, excp: import simplejson as json

I'm curious why you bother to bind the exception to the excp when you 
don't actually use it? If this occurs in the top level of a module, it 
just introduces an apparently unneeded and unused global name.



-- 
Steven



More information about the Python-list mailing list