[Python-ideas] Making colons optional?
denis.spir at free.fr
Fri Feb 6 10:11:30 CET 2009
Le Fri, 06 Feb 2009 08:40:27 +1100,
Ben Finney <ben+python at benfinney.id.au> a écrit :
> > We don't like semicolons in Python, but what would stop a hard-core
> > C users to end every statement with a semicolon? They have the
> > choice.
> Laziness (the good kind). Once someone discovers that they *don't have
> to* add the semicolons, and it doesn't affect the operation of their
> program, those semicolons will, I predict, become much less frequent.
Ditto for colons!
<div class = "meta_note">
Strange that you do not realize that all arguments pro / against semi-colons apply to colons as well: they have same syntactic position and the same semantics. So that clear, consistent, choices are:
* both to trash
* both compulsery
* both optional
My opinion: the rest is blahblah confusing habits and good design. Saying "I prefere this because I'm used to it." is fully respectable. This does not mean that other options are weaker design choices.
la vida e estranya
More information about the Python-ideas