[Zope-dev] [Checkins] SVN: zope.annotation/trunk/setup.py Whitespace fixes
Marius Gedminas
marius at gedmin.as
Thu Apr 2 18:18:23 EDT 2009
On Wed, Apr 01, 2009 at 11:44:03PM +0200, Jacob Holm wrote:
> If this whitespace fix is based on the current style guide, I think the
> guide needs to be fixed. I find the fixed version much less readable. A
> function that takes this many arguments should have an exception to the
> PEP 8 rule of no whitespace around the equals sign used for keyword
> arguments. I *think* a reasonable rule is that if you split the call
> over multiple lines with one argument per line, you should add single
> spaces before and after the equals sign. What does anyone else think?
I don't want to argue about what's right for Zope, but you asked my
(well, everone's) opinion about this, so:
-1
I think PEP-8 is right, and keyword arguments should not have spaces
around the equals sign *especially* if the argument list is long and is
split into multiple lines.
setup(
<many lines>
foo = bar,
<many more lines>
)
looks like a mistaken assignment of a tuple to a name, while
setup(
<many lines>
foo=bar,
<many more lines>
)
looks like a function call.
Marius Gedminas
--
http://pov.lt/ -- Zope 3 consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20090403/6f373391/attachment.bin
More information about the Zope-Dev
mailing list