Missing modules for python

Jed Smith jed at jedsmith.org
Tue Oct 12 13:33:37 EDT 2010


On Mon, Oct 11, 2010 at 7:02 PM, Steven D'Aprano
<steve at remove-this-cybersource.com.au> wrote:
> 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.

Typed from memory, and now that you mention it, I don't think I
actually did. At any rate, we mandated 2.6 and it's no longer there.

-- 
Jed Smith
jed at jedsmith.org



More information about the Python-list mailing list