Py3K idea: why not drop the colon?
steve at holdenweb.com
Fri Nov 10 19:36:34 CET 2006
Michael Hobbs wrote:
> Ben Finney wrote:
>> A use case. What problem is being solved by introducing this
> The same problem that is solved by not having to type parens around the
> 'if' conditional, a la C and its derivatives. That is, it's unnecessary
> typing to no good advantage, IMHO. I was coding in Ruby for several
> months and got very comfortable with just typing the if conditional and
> hitting return, without any extra syntax. When I came back to Python, I
> found that I felt annoyed every time I typed the colon, since it
> obviously isn't required. The FAQ says that the colon increases
> readability, but I'm skeptical. The indentation seems to provide more
> than enough of a visual clue as to where the if conditional ends.
So you'd also like us to shorten the names of the builtins and the the
keywords? Why bother with "def" when we could just use "d", "class" when
we could just use "c"? Or *does* readability matter to some degree?
> As far as using the FAQ as gospel, the FAQ also provides arguments for
> why there isn't a with statement or a switch statement. The with
> statement has already been implemented in 2.5 and there's a PEP to
> implement switch (3103).
But the "with" statement isn't the one that "with" was reserved for in
the FAQ, which is really talking about the same kind of "with" statement
that Visual Basic uses: an implied left operand for unary "." operations.
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden
More information about the Python-list