This is why tabs and only tabs are the proper line indentation character. One tab = indent one level. Two tabs = indent two levels. Tab is the only line indent char. It's a semantic definition. No more confusion.
So, here's my problem with whitespace being syntactically significant ... everybody likes to see code with different levels of indent.
Not a problem. Everyone defines how much space to render for a tab in their own editor. Everyone wins.
The problem was his electric mode in emacs was thinking itself oh-so-clever, and instead of storing the *actual* number of tab indents or whitespace, it just stripped them in favor of a single tab that emacs would then know how to render later.
Misbehaving tools are bad. You correctly locked him out until he fixed it. Problem solved.
For any of us who have taken compiler classes, a context free grammar specifically ignores whitespace. That's how compilers have worked for a very long time, if the grammar productions for your language involve counting whitespace ... well, my compilers prof would have failed me. Instead of having a visible thing to define a block, oh, well, just indent a few more chars.
Tab = indent. Space = ignore. Problem solved.
You can't see what character whitespace actually is ... is that 8 spaces or a tab?
Beginning of line = tab = indent. Elsewhere = space = ignore. Problem solved.
I've seen someone debug a python program, and even though things were in the same column in the editor, some were tabs and some were spaces, which had the very bizarre effect of making it semantically different than it looked.
That man was an idiot. Run python -t. Tabs and spaces should never be mixed. Tab is the only proper, semantic line indent char. Problem solved.
I have several issues with whitespace defining block structure, but the ones you identified are trivial to fix. The real issues are:
- communicating code through sources that collapse or mangle whitespace (html, some emails)
- difficulty with quickly and efficiently changing block structure, e.g. to temporarily bypass a conditional or refactor functions
The second is properly addressed by better editing tools. The first is annoying, but not enough to outweigh the benefits in clarity and expressiveness from using python. It's really quite easy to adjust.