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:


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.

  <many lines>
    foo = bar,
  <many more lines>

looks like a mistaken assignment of a tuple to a name, while

  <many lines>
  <many more lines>

looks like a function call.

Marius Gedminas
http://pov.lt/ -- Zope 3 consulting and development

Attachment: signature.asc
Description: Digital signature

Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to