[Sugar-devel] [PATCH 05/21 sugar-toolkit] PEP8 cleanup: fix whitespace around operator
Simon Schampijer
simon at schampijer.de
Tue Nov 23 10:39:16 EST 2010
On 11/19/2010 05:24 PM, Sascha Silbe wrote:
> Excerpts from Simon Schampijer's message of Fri Oct 29 12:46:54 +0200 2010:
>
>>> I've left the powers as-is because IMO they should directly follow the base,
>>> unlike other operators.
>>
>> Hmmm, I see your argument, however I think it is not worth to make an
>> exception here.
>
> I want to get this patch landed, so I just did it the way you want it
> (i.e. added the spaces) for v2. ;)
>
>
>>> - self.bundle_name = reduce(lambda x, y: x+y, self.activity_name.split())
>>> + self.bundle_name = reduce(operator.add, self.activity_name.split())
>>
>> Why do you prefer operator.add here instead of doing the white spaces
>> around the '+'? To me at least it does not get easier to read.
>
> Because
> a) operator.add is more clear to me and
> b) adding the spaces would have required breaking the line, making it
> harder to read.
>
> Sascha
Accepted :)
Simon
>
> --
> http://sascha.silbe.org/
> http://www.infra-silbe.de/
>
>
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
More information about the Sugar-devel
mailing list