Python: Myths about Indentation
September 26, 2007 § Leave a comment
I got this from my friend, and he got it somewhere from GVR blog.
This article is an attempt to dismiss those who exercise FUD towards Python’s indentation.
Below is the summary that I compiled for readers:
Whitespace is significant in Python source code.
Response: No, not really. Only the most-left white space.
Python forces me to use certain indentation style.
Response: If you use new line for your block of code, yes that’s true. That’s because the indentation is explicitly enforcing the block structure.
You cannot safely mixed Tab or Spaces in Python.
Response: C also has the same problem, and most modern IDE will choose one or another anyway.
I just don’t like it.
How does the compiler parses the indentation anyway?
Response: You have to read the main article. It’s fairly simple & well-defined.