[Python-ideas] Making colons optional?
Riobard Zhan
yaogzhan at gmail.com
Sun Feb 8 07:47:07 CET 2009
On 6-Feb-09, at 9:00 PM, Steven D'Aprano wrote:
> No, it is pretty clear that you do not understand the fundamental
> difference in semantics between colons and semi-colons. It is not an
> inconsistency.
I'm not arguing it is inconsistent because they have similar
semantics. I'm arguing it is inconsistent because both are redundant
but one is optional while the other mandatory.
You do agree indentation signifies association, and colons reinforce
the association. To me, it means indentation is good enough, and
colons are redundant if followed by a line break and indentation
instead of a statement.
> Because colons are used for a very different thing than semi-colons,
> any inconsistency between the rules for one and the rules for the
> other is imaginary. Different purposes, different rules.
It is real. That you have different rules for semicolons and colons is
the inconsistency. There should be just one rule instead of two.
Different purposes do not automatically imply different rules,
otherwise we will have too many rules to hold in memory.
More information about the Python-ideas
mailing list