[Bf-committers] (re) proposal for pep8 for blender scripts

Dalai Felinto dfelinto at gmail.com
Fri Oct 30 10:52:02 CET 2009


Hi there.

Pep8 'kind of' sounds fine to me.
I don't really get this 80 characters limit since I usually scale up  
the text anyway (for it's impossible to predict the lines length).

That been said I would like to have an optional "auto-convert tabs to  
4 spaces". And we would need the indent/unindent operator (select line  
+ Tab/Shift-Tab) to work accordingly IMHO. (as you can guess the only  
point that doesn't fully content me is the tab/spaces compliance)...

Cheers,
Dalai

-----
Dalai Felinto
http://blenderecia.orgfree.com

On 29/10/2009, at 19:07, Brecht Van Lommel <brecht at blender.org> wrote:

> Hi,
>
> I agree on following PEP8. My personal preference is to go over 80
> characters in some cases since I think it can help readability.
> There's many cases in the UI layout where the code for one button
> takes up 80-100 characters, splitting that up makes things less
> readable for me.
>
> There's more in PEP8 than the first few paragraphs though. We don't
> have that many scripts in 2.5 yet, so it probably won't be too much
> work. Also the Python/RNA api follows these conventions already for
> the most part. Some of the changes that would be needed:
>
> * Modules like MathUtils can't use camel case
> * Registered class members variables can't be named e.g. __props__
> * Drop the SOME_OT_operator convention
>
> On Thu, 2009-10-29 at 09:49 -0600, Chris Want wrote:
>> Basically, I think we should strive for full PEP8 adoption,
>> or why bother? As the PEP8 document says "A Foolish Consistency
>> is the Hobgoblin of Little Minds".
>
> I interpreted that quote (and the paragraphs following it) as opposite
> to your argument :), i.e. following consistency rules too closely is
> not ideal either, readability is more important than consistency. But
> if a lot of people still use 80 line wide terminals, then I guess
> that's a good argument in favor of limiting the line width to that.
>
> Brecht.
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers


More information about the Bf-committers mailing list