[Python-ideas] Making colons optional?
Riobard Zhan
yaogzhan at gmail.com
Sun Feb 8 08:58:24 CET 2009
On 8-Feb-09, at 3:50 AM, Bruce Leban wrote:
> You can not generalize that far. Most programming languages require
> commas (notable exceptions include Lisp and Tcl), but Python is the
> only language that requires trailing colons.
>
> Nope. See http://en.wikipedia.org/wiki/Smalltalk
Just checked. Smalltalk's colons seem to have completely different
semantics. Correct me if I'm wrong, but they appear to be at the end
of every keyword, including ifTrue and ifElse.
> There are some differences between making commas optional and making
> trailing colons optional.
>
> "There are some differences between making X optional and making Y
> optional" for all features X and Y.
This generalization is meaningless. You deliberately ignored the
original context.
> Clearly the use of the specific semicolon character is confusing
> you. So let's replace it with a better symbol: \n as in this example:
>
> for i in x: foo(i) \n bar(i+1)
>
> Sure a \n is optional at the end of any line because a blank line is
> always allowed. So what?
What's the point you are trying to make?
More information about the Python-ideas
mailing list