Ok, so here's a summary of what I've heard so far:

Advantages of moving to PEP8 standard:
It's what "the recent python world" seems to have standardized on
We don't have to reinvent our own style.
The 4 space indent may allow us to use less line wraps/continuations

Disadvantages:
Some do not like the 4 space indent
It would mean changing what we currently do
It would move us away from similarities with some C style approaches 
(perhaps making it harder for non-python programmers to get up to speed 
quickly)

Notes:
There doesn't appear to by an official (or non-official) pylintrc file 
that mirrors PEP8, but there is a claim from pylint's creators that the 
default behavior should come close to PEP8 [1]

(The examples and information that follow come from [2])
Also, I spent some time looking at the PEP8 standard and here's a 
summary of what I think the changes would be:
Line length of 79 instead of 80 (what we've said before) or 90 (what the 
current file uses)
4 space indentation
Changes in the indentation of continued lines. So, its:

        def __init__(self, width, height,
                     color='black', emphasis=None, highlight=0):
            if width == 0 and height == 0 and \
               color == 'red' and emphasis == 'strong' or \
               highlight > 100:


Rather than:

        def __init__(self, width, height,
            color='black', emphasis=None, highlight=0):
                if width == 0 and height == 0 and \
                    color == 'red' and emphasis == 'strong' or \
                    highlight > 100:

Also, in a change from what I think is chosen right now:
    The preferred way of wrapping long lines is by using Python's implied line
    continuation inside parentheses, brackets and braces.


As far as I can tell, our naming conventions for classes, functions, 
modules, etc match what's recommended, but there might be small places 
of difference.

If I've forgotten or missed any advantages or disadvantages, please 
point them out.

Thanks,
Brock


[1] http://mail.python.org/pipermail/python-dev/2006-April/064256.html
[2] http://www.python.org/dev/peps/pep-0008/

Tom Mueller (pkg-discuss) wrote:
> +1. It certainly makes it easier for people to join the project if we 
> can just point to PEP8 and say that's what the style is.
>
> Tom
>
> Shawn Walker wrote:
>>
>> I'd personally rather just follow PEP8 and be done with it. Someone
>> has already done the hard work of figuring out a decent style, and
>> it's well accepted by the Python community.
>>
>> Ultimately, the style doesn't matter to me as long as it isn't GNU
>> brace style and it is easy to follow :-)
>>
>>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> pkg-discuss mailing list
> [email protected]
> http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
>   

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to