lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replace Tab with 8 Spaces for .py files (issue4627062)


From: Graham Percival
Subject: Re: Replace Tab with 8 Spaces for .py files (issue4627062)
Date: Fri, 24 Jun 2011 21:28:13 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Fri, Jun 24, 2011 at 07:49:02PM +0200, Matthias Kilian wrote:
> [slightly offtopic tab size rant ;-)]
> 
> On Fri, Jun 24, 2011 at 04:44:21PM +0100, Graham Percival wrote:
> > In the old/bad style that emacs produced, one tab was used to
> > represent 8 spaces.  Yes, it was doubly confusing.
> 
> Well, no. People and/or editors who used one tab per indentation
> level (and probably fiddling with the displayed *tab* width other
> than 8 spaces) where confused.

No, it's worse than that.  We had .py files which used:
  1 indent level  = 4 spaces
  2 indent levels = 1 tab
  3 indent levels = 1 tab + 4 spaces

That is, IMNSHO, at least "doubly confusing".

> Whenever I see any file that needs a tab width other than 8 spaces
> to display correctly (be it programs, be it configuration files),
> I get *very* upset.

I get very upset when I see any file that needs a tab width to be
X spaces at all.  If somebody wants to use tabs to indicate
indentation, great!  X tabs = X levels of indentation.  If
somebody wants to use spaces to indicated indentation, that's
fine!  X spaces = K*X levels of indentation, where K is a
constant.  That's cool, I can swing with that.  But don't mix the
systems.  And using a tab to represent 8 spaces is not a saving
grace.

In my personal code, I sometimes do this:
def foo(x, y):
\tbar_baz(x,
\t        y
\t        )

but I'd never try to pass that off in a shared source project.
(and I'm finally in the process of repenting from tab ways and
switching all my .py files to 4-spaces.  Yes, it took me 4 years
to get around to reading those "how to set up vim for python" blog
posts)

Cheers,
- Graham



reply via email to

[Prev in Thread] Current Thread [Next in Thread]