[python-win32] Request for comments - the spaces issue

Tim Roberts timr at probo.com
Wed May 28 18:46:31 CEST 2008


Vernon Cole wrote:
> Let's not loose track of the thread here.
> The question was whether there should be a space between the function 
> name and the leading parenthesis, as:
>   my_function (arg)
> vs:
>   my_function(arg)
>
> PEP8 clearly requires the latter.

PEP8 is a coding standard document for the Python standard library.  
Nothing more.  It is not a mandate for all Python code.  I disagree with 
several of the conventions in PEP8, although if I ever submit anything 
to the standard library, I will reformat it to match.

The key lesson in that PEP is that you should stick to SOME standard.  
It need not be the same standard used by others.


> IMHO any published example code, which is what we are talking about 
> here, should follow the PEP8 style guide.

No, that's going WAY too far.  It is a mandate for the standard library, 
and it is a starting point for new Python coders.


> (Besides which I personally REALLY hate the extra space.)

You are entitled to do so.  I don't like it either, but I will certainly 
defend TJG's right to write his code using his own standards.  I, 
personally, like Camel-cased names with an extra space inside the 
parentheses, both of which are discouraged by PEP8:

    obj = myFunction( one, two )

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list