[Python-ideas] Indentation, again: Problems with moving and combining code across editors.
Stephen J. Turnbull
stephen at xemacs.org
Sat Aug 30 07:32:07 CEST 2014
Milind Khadilkar writes:
> Besides, spaces become difficult to count and distinguish from
> tabs, adding to the problem. (Why allow tabs at all?)
Working code should not be broken gratuitously. Sure, it was an
unfortunate decision in the first place, but we can't change that
original decision now.
> Why can't Python be made to accept the following indentation of
> code (in *addition* to the current schemes)?
Because we *already have it*: the character is ' '. If *you* follow
that rule, you won't have problems copy/pasting your own code into
well-behaved code. If you're working with somebody else's code which
mixes tabs and spaces, *using an alternative character doesn't help*,
whether the "bad" code is source or target.
More information about the Python-ideas
mailing list