[Sugar-devel] [PATCH 05/21 sugar-toolkit] PEP8 cleanup: fix whitespace around operator

Sascha Silbe sascha-ml-reply-to-2010-3 at silbe.org
Fri Nov 19 11:24:50 EST 2010


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

--
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20101119/9b1516e9/attachment.pgp>


More information about the Sugar-devel mailing list