I hate you all

Roland Koebler r.koebler at yahoo.de
Sun Apr 7 18:52:58 EDT 2013


Hi,

> Well all previous (python 2) code is meant to work for a tab size of
> 8.
yes, but even in Python 2, mixing spaces and tabs is considered bad
style and should be avoided. And code-checkers like pylint (which I
can recommend to everyone) create a warning.

> You may call this "categorically wrong", but it has been there a
> long while, is is still in use, and it sticks to the default.
As I said, mixing tabs and spaces for indentation was *always* a bad
idea, and is discouraged also in Python 2.

> Spaces-only can achieve compatibility between different people
> settings for formatted text like source code. But so does a common
> default for the tab size,
But there's no such thing as "default tab size". Configuring the
tab-size is quite common among programmers.


But why do you insist on using tabs at all? The best way -- in my
opinion -- is to use the tab- and backspace-key for indentation, and
let the editor convert it to spaces. (And use some tool to convert
all tabs in the old code.)

I don't see *any* advantage of mixed spaces and tabs, but quite some
disadvantages/problems.

> What I would expect is some option in python to make tabs work the
> way they used to. I want a choice for me to preserve my settings,
> the same way you want to preserve yours.
>
> What I want should not be much to ask, since this is how python 2
> used to do things.
> 
> I admit such a '--fixed-tabs' option, that will make tab stops be 8
> columns apart, and allow any number of spaces like in python 2,
> makes the code I write dependent on that option.
There's no need to add this to Python 3, since you already have what
you want. Simply use:

expand yourscript.py | python3


regards
Roland



More information about the Python-list mailing list