← Back to team overview

kicad-developers team mailing list archive

Re: more pythonic scripting API for pcbnew

 

In response to a message written on 07.01.2015, 21:45, from Miguel Ángel Ajo:
PEP8 strongly recommends spaces: (I was about to link the same Adam did).

The reasoning is tabs is that change width from editor to editor or from
configuration to configuration. Spaces are always the same.
If programmer leaves information about tab-spaces in some comments at begin of
file, that will not be to messy. It will be nice, if someone from Python dev
team will include to language syntax(as was done with coding/encoding):
„# -*- tabstop: <tab space> -*-”

Python syntax heavily relies on indenting for blocks, and that can result in
problems if people starts mixing spaces or tabs.

At least mixing spaces and tabs should be totally avoided.

My  inclination is to use spaces. I do that with those settings in vimdc:

set tabstop=4 set shiftwidth=4 set expandtab
My tabstop is 4 spaces too… ;)

But I’m not writing too much in KiCad lately, so.. my opinion is not very
important here. The only thing I believe super important is not to mix.
So I use space only as text spaces, nor indentation…


--
Best Regards,
LordBlick


References