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

David Bond david at davidbond.net
Fri May 29 14:43:26 CEST 2009


I understand there are two schools in the spaces vs. tabs religious war 
with good arguments on both sides.  [Me, I'm a tabber, as I can then 
change the indent to 2, 3, 4 or 8 spaces when visualising code or text 
document elsewhere (I like 3 spaces).  It is difficult to convert in the 
other direction.  I do not claim a moral high-ground however - this is 
just a personal preference.]

My point is this: please make the tab key behaviour optional.  Some like 
to insert N-spaces, some like to insert \t-visualised-as-M-spaces.  
Eclipse offers this option, for reference.

I believe this approach will avoid heated debate down the road as 
neither option is "correct" as such.

David

p.s. +1 proposal for consistency

On 28/05/2009 22:22, Alberto Torres wrote:
> I think the blender editor could be changed to make it more
> consistent: currently with the tab key, it generates a tab character.
> In python, a tab == 8 spaces, while in the text editor, a tab == 4
> spaces; so when you mix spaces and tabs, it wreaks havoc.
>
> My proposal is to change the display of tabs in the editor to 8
> spaces, and make the behaviour of the tab key configurable: either to
> insert a tab character or insert 4 spaces.
>
> Also, +1 for the proposal.
>
> DiThi
>
>
> 2009/5/28 joe<joeedh at gmail.com>:
>    
>> +1 from me.  We can have a "styleguidelines.txt" or something in svn
>> that can outline this for people.
>>
>> Joe
>>
>> On Thu, May 28, 2009 at 7:29 AM, Stani<spe.stani.be at gmail.com>  wrote:
>>      
>>> 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
>>>
>>>        
>> _______________________________________________
>> Bf-taskforce25 mailing list
>> Bf-taskforce25 at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-taskforce25
>>
>>      
> _______________________________________________
> Bf-taskforce25 mailing list
> Bf-taskforce25 at blender.org
> http://lists.blender.org/mailman/listinfo/bf-taskforce25
>    

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________


More information about the Bf-taskforce25 mailing list