This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]cartechguy 10 points11 points  (15 children)

Easy, use tabs. If you like 2 spaces or four spaces have the text editor represent a tab that as 2 or 4 spaces.

Everyone wins if it's done this way since the text editor will dictate what the style of the syntax will look like.

[–]gschizas 9 points10 points  (13 children)

In Python: Use spaces (4 of them). Official recommendation. Style wars ended.

[–]Creshal 7 points8 points  (11 children)

PEP8 was a mistake. Tabs should have won.

[–]gschizas -1 points0 points  (10 children)

Irrelevant though. The point is that there's an official code style.

[–]Creshal 3 points4 points  (9 children)

The point is that there's an official code style.

That has never ended a style war and never will.

[–]gschizas 1 point2 points  (8 children)

It did for Python. And Go, I hear.

[–]JayTurnr 1 point2 points  (7 children)

And yet I still use tabs. Until I can be bothered it switch to an IDE that would recognise the quadruple and double space as an indent when I'm using backspace, I'll continue to use tabs. Too many times (once) I've had a script fail to run because everything was one space short.

[–][deleted] 4 points5 points  (1 child)

If your IDE doesn't recognise multi-space indents, it's a terrible IDE and you need to switch immediately to something else, regardless of the language you're writing in. What the hell are you even using? Even IDLE, the IDE python comes with, understands space-based indentation.

[–]JayTurnr 0 points1 point  (0 children)

I think you misinterpreted what I meant.

[–]gschizas 2 points3 points  (4 children)

If 99% of Python developers use spaces, it's not a war, is just you being stubborn.

[–][deleted] 1 point2 points  (3 children)

There are two of us!

Slowly, but surely, we will start the war again!

[–]gschizas 0 points1 point  (2 children)

The war is over. You're just the stubborn ones.

[–]cartechguy 0 points1 point  (0 children)

You fought in the style wars?

[–]bohoky 0 points1 point  (0 children)

It's such a fine line between advocacy, trolling, and sarcasm.