|
|
|
|
|
by simias
4537 days ago
|
|
My point is that it's not always possible for the editor to know what the indentation is supposed to be because it can't know what the code is supposed to do. Suppose you have code like this: [...]
if a:
b
c
[...]
And then you paste some snippet you got from somewhere else between b and c: [...]
if a:
b
pasted_snippet
c
[...]
The editor cannot know how to indent that properly. It's not a problem in most other languages.Again, I'm not trying to say it's a deal breaker and Python is useless as a result, I just think it's a small mistake in the design of the language. It's like non-breaking switch/case in C, it doesn't make the language unusable but it is an annoyance. |
|
Python's use of semantic white space is more a function of it's inheritance than anything. It's based off of ABC[1].
[1] http://en.wikipedia.org/wiki/ABC_%28programming_language%29