[Python-checkins] r73379 - sandbox/trunk/2to3/lib2to3/fixes/fix_dict.py

Eric Smith eric at trueblade.com
Fri Jun 12 14:26:20 CEST 2009


Nick Coghlan wrote:
> benjamin.peterson wrote:
>> Author: benjamin.peterson
>> Date: Fri Jun 12 01:06:21 2009
>> New Revision: 73379
>>
>> Log:
>> use a real conditional expresion
>>
>> Modified:
>>    sandbox/trunk/2to3/lib2to3/fixes/fix_dict.py
>>
>> Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_dict.py
>> ==============================================================================
>> --- sandbox/trunk/2to3/lib2to3/fixes/fix_dict.py	(original)
>> +++ sandbox/trunk/2to3/lib2to3/fixes/fix_dict.py	Fri Jun 12 01:06:21 2009
>> @@ -66,7 +66,7 @@
>>          new = pytree.Node(syms.power, args)
>>          if not special:
>>              new.prefix = u""
>> -            new = Call(Name(isiter and u"iter" or u"list"), [new])
>> +            new = Call(u"iter" if isiter else u"list"), [new])
> 
> I'm not all that familiar with 2to3 - was the removal of the call to
> Name() here deliberate?

Probably not deliberate, since it leaves a syntax error with mismatched 
parens.


More information about the Python-checkins mailing list