JonasSC / PythonistManifesto

A short introduction to programming with Python for advanced beginners
0 stars 1 forks source link

Don't advocate tabs! #1

Closed mgeier closed 9 years ago

mgeier commented 9 years ago

I skimmed through your manifesto and I really liked its style and I think it's very well written ...

... until I saw that you suggest to use tabs instead of 4 spaces!

I know there are people with different tastes and I don't want to start a discussion here, because in Python no discussion is necessary. This topic is done! Use 4 spaces! No need to waste anyones time or energy with this.

You are not helping anyone if you advocate the use of tabs.

Don't do it, it's a mistake.

I wouldn't have said anything if the rest of your manifesto would be crap, but it's not. And I think it would be sad to blemish an otherwise very good and useful work.

I guess it's OK to doubt the line length restriction of PEP8, because even such prominent Pythonistas as Raymond Hettinger are doing it: https://youtu.be/wf-BqAjZb8M

JonasSC commented 9 years ago

Hello Matthias,

Thank you very much for all those valuable suggestions! I'm sorry, that it took me so long to answer. I was on vacation and had no good internet for a week.

Now, that you wrote this comment, I looked in the internet for discussions about "tabs vs. spaces" and although I still detest space indentation, I kind of feel, that you are right. The practicality or convenience of a certain method of indentation is not crucial enough to be more important than standard compliance. Especially in Python, where an editor, that is strictly PEP-8 conform rather than being able to recognize the indentation character from the given code file, can produce some seriously ill-behaving programs from a tab-indented piece of code.

I'll look over that section and edit it as soon as I find the time. But before, I'll finish to watch that great talk from Raymond Hettinger, that you posted, so I don't miss recent developments in the Python style guide.

Thanks a lot again!

JonasSC commented 9 years ago

Hello Matthias,

I'm sorry, that this took me over a month. I was on vacation a lot. The manual recommends four spaces for indentation now. I hope, you like the new text.

Thank you! Jonas

mgeier commented 9 years ago

Great, I like it!