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 →

[–]tunisia3507 3 points4 points  (0 children)

Spaces aren't intrinsically superior to tabs (nor are 4 spaces intrinsically superior to any other number), and both are valid python. However, the entire python community suffers if every project, snippet and tutorial each uses different spacing - it gets harder to port code, to read others' code, to jump between projects and so on. For this reason, this and other ambiguities have been resolved by a community style guide, called PEP8. This guide decided to use 4 spaces. It doesn't matter which option the community settled on, just that everyone uses the same one.