[Zope-dev] [Checkins] SVN: zope.annotation/trunk/setup.py Whitespace fixes

Zvezdan Petkovic zvezdan at zope.com
Thu Apr 2 09:37:57 EDT 2009


On Apr 1, 2009, at 5:44 PM, 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?

-1

The PEP-8 and Zope style for keyword arguments work here just fine.
Readability is improved by putting arguments on separate lines, not by  
adding space around equal sign.

Additionally, we could do without fancy spacing.
For example, the lists don't have a consistent style in this patch.

One avoids fancy spacing ...

>> +    classifiers=[
>>         'Development Status :: 5 - Production/Stable',
>>         'Intended Audience :: Developers',
>>         'License :: OSI Approved :: Zope Public License',
>> @@ -40,23 +40,23 @@
>>         'Topic :: Internet :: WWW/HTTP',
>>         'Topic :: Software Development',
>>         ],

The other two use fancy spacing, are not alphabetically sorted, and do  
not have consistent rule on commas after the last element ...

>> +    install_requires=['setuptools',
>> +                      'zope.interface',
>> +                      'zope.component',
>> +                      'zope.location',
>> +                      'zope.proxy',
>> +                      ],
>> +    extras_require=dict(
>> +        test=['zope.testing',
>> +              'ZODB3'],
>>         ),

This would be more consistent, is sorted, and ensures easy addition/ 
removal of each line including the first, and the last line in the  
lists.

     install_requires=[
         'setuptools',
         'zope.component',
         'zope.interface',
         'zope.location',
         'zope.proxy',
         ],
     extras_require=dict(
         test=[
             'ZODB3',
             'zope.testing',
             ],
         ),



More information about the Zope-Dev mailing list