[Bf-committers] (re) proposal for pep8 for blender scripts
Brecht Van Lommel
brecht at blender.org
Thu Oct 29 19:07:53 CET 2009
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.
More information about the Bf-committers