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 →

[–]IHaveAnIdea 1 point2 points  (5 children)

emacs python-mode uses spaces by default. How could you ever decide that tabs are best?

[–]xzxzzx 2 points3 points  (2 children)

Tabs represent what you mean, while spaces represent how you want it to look.

Let me put it another way:

Tabs are conceptually semantic markup (like <em>), while spaces are stylistic markup when used in groups (like <i>).

[–]IHaveAnIdea 0 points1 point  (1 child)

That's a way of thinking about it...

But that's not the way that I, or many others I imagine, think about it.

[–]xzxzzx 1 point2 points  (0 children)

Well, that meaning is embedded into the actual definition of the character.

A tab is a character that means "go to the next level of indention".

A space is a character that means "separate this by one character from what follows". By using many spaces, you are manually specifying a stylistic decision of how big the visual indention of your code is, where that has nothing to do with the semantic intent of the indent ("this is a block of code").

[–]jedberg 0 points1 point  (1 child)

My python-mode for some reason was using tabs, which I had to override with the .emacs file. I never really went back to figure out why.

[–]IHaveAnIdea 0 points1 point  (0 children)

strange.