PEP8 and 4 spaces

Roy Smith roy at panix.com
Fri Jul 4 12:31:24 EDT 2014


In article <mailman.11497.1404486912.18130.python-list at python.org>,
 George Silva <georger.silva at gmail.com> wrote:

> Isn't this an old discussion? Just configure your editor properly. In my
> team we all use spaces, but I'll be damned if I need to type 12 spaces in a
> row. I'll just configured Sublime to insert spaces instead of tabs. Problem
> solved.

On emacs, I used auto-indent mode.  I hit tab, and it automatically 
inserts the correct number of spaces (where "correct" is 
language-specific; for Python, it uses the pep-8 rules).  It also does 
syntax highlighting, parenthesis and quote matching, keyword 
recognition, etc.

I assume any sane editor has similar functionality.  I see my coworkers 
using vim, sublime, eclipse, and X-code.  They all appear to do these 
things, and I would thus classify any of them as sane editors.  I'm sure 
there are others.  If the tool you're (in the generic sense of "you") 
using doesn't have this type of basic language support, you should 
reconsider your choice of tool.



More information about the Python-list mailing list