Why whitespace is significant in Python

From the Daily Kos discussion about how they will build the next version of DailyKos:

Whitespace is significant in Python because it helps you catch mistakes. In block-structured programming languages that use brackets, it is easy for your indentation and your brackets to get out of sync with each other, especially as you make modifications to existing code. Experience has shown that even though the compiler or interpreter reads the brackets, the programmer reads the indentation. This can be a source of frustrating bugs that should be obvious, but prove embarrassingly hard to find.
Python eliminates the problem by making the compiler/interpreter read the same thing that programmers generally do (in practise). If you’re used to using brackets, it will annoy you for the first few days, and then you’ll forget about it (unless you mix tabs and spaces, in which case your suffering will be legendary, even in Hell).

admin