On Mon, Feb 6, 2012 at 7:16 PM, Pascal Chambon <[email protected]> wrote:
> Le 06/02/2012 00:48, lkcl luke a écrit :
>> rright.
>> lkcl@teenymac:~/pyjamas/pyjs/src/pyjs$ diff -uwbB
>> translator_proto-KEES.py translator_proto-KLUEV.py>  f
>>
>> vi f
>> .....
>> .....
>>
>> @@ -2255,7 +2272,9 @@
>>           else:
>>               fail = ''
>>           self.w( self.spacing() + "if (!( " + expr + " )) {")
>> -        self.w( self.spacing() + "   throw @{{AssertionError}}(%s);" % fail)
>> +        self.w( self.spacing() + "   throw %(AssertionError)s(%(fail)s);" %
>> +                dict(AssertionError=self.pyjslib_name('AssertionError'),
>> +                     fail=fail))
>>           self.w( self.spacing() + " }")
>>
>>       def _return(self, node, current_klass):
>> @@ -2338,7 +2357,7 @@
>>
>>
>> ok.  right.  %(AssertionError)s.... that's a python string/dict
>> formatting thing. "%(AssertionError)" % {'AssertionError': 'hello'} =>
>> "hello"
>>
>> iiinteresting.  it looks like daniel decided to use python formatting,
>> here.  perhaps to reduce space, perhaps to optimise pricessing
>> requirements, i don't know - but it looks like it's ok.
>>
>> i wish he'd bloody well discussed this stuff.  that was the whole
>> point of gsoc.  *sigh*.  hey daniel, have you dropped off the face of
>> the planet?  we're missing you! :)
>>
>> l.
>>
> IIRC, in then I left everything as @{{}} while merging, and just put the
> two base versions aside in case string formatting actually had an
> interest over template vars.

 well the thing is that if you use the %(.....) formatting idea, it
would actually be quicker, as you'd be using c code (in
http://python.org) to do the format conversion.

 so, same effect achieved, just different route.

 l.

Reply via email to