[Bf-taskforce25] Proposal to follow PEP8 for all python scripting for Blender 2.5

Nathan Letwory jesterking at letwory.net
Mon Jun 8 14:08:14 CEST 2009


-1 from me, when it comes to code in our SVN repository (bf-blender).
Our main code (C) has tabs as convention, and it'd be good to keep
that for every other source file as well.

Yes, we should stick to conventions, so let it be our own. I don't see
why spaces are preferred over tabs, since most editors can configure
the visual width of tabs, whereas with spaces you're stuck (on IRC I
used the word fucked, but I guess that's a bit strong :° ).

For Blender 2.5 branch I have already converted some scons files to
use tabs instead of spaces. It at least would mean no more
reconfiguring of the editor whenever I switch between different
languages.

People can do whatever they please outside the svn repo for
bf-blender, but in there I'd say we stick to tabs, as tabs is used in
the largest part of the code (unverified fact).

There's been a lot of animo pro-spaces, but I think the reasons are
just wrong. I have yet to find an editor that allows for configuring
space-length, whereas all the ones that I've used do allow that for
tabs. And why Python converts tabs internally to 8 spaces is totally
beyond me. But we should not have to think about that.

So, for us coders it should be: open any source code in our
repository, edit, save - without having to think about indentation. I
admit, our scons files are a mess regarding that, but over the years
it has become apparent to me that we should stick to tabs for our
source base.

We can have our blender text editor provide choice between
spaces/tabs, but in our very own svn repo, we should stick to tabs.

Ok, enough rambling. Main point is -1 from me.

/Nathan



2009/5/28 Stani <spe.stani.be at gmail.com>:
> I think Blender 2.5 is a good occasion to adopt the PEP8 Style Guide
> for Python Code, which is widely spread in the Python community. This
> will enhance the chance to make code more readable, make it more easy
> to share code and to collaborate. The PEP8 is the result of many years
> of very experienced Python coders (Guido et alii.) and I can garantuee
> it is hard to compete with them ;-)
>
> This intention was already formulated in "Style and PEP-8" on
> http://wiki.blender.org/index.php/BlenderDev/Blender2.5/PythonAPI
>
> What I like to do is, make it official and even to encourage it for
> anyone writing scripts in Blender. One of the important details of the
> PEP8 is: "For new projects, spaces-only are strongly recommended over
> tabs." (I think now both spaces and tabs are used, which will create
> confusion in the end.) It might seem some trouble now to adopt to
> this, but it will save much more trouble later.
>
> Can we vote on this issue and depending on the outcome make the switch?
>
> Stani
>
> --
> Phatch Photo Batch Processor - http://photobatch.stani.be
> SPE Python IDE - http://pythonide.stani.be
> _______________________________________________
> Bf-taskforce25 mailing list
> Bf-taskforce25 at blender.org
> http://lists.blender.org/mailman/listinfo/bf-taskforce25
>
>


More information about the Bf-taskforce25 mailing list