A Suggestion for Python Colon Syntax

Alex Martelli aleaxit at yahoo.com
Thu Dec 21 23:34:24 CET 2000

"William Djaja Tjokroaminata" <billtj at z.glue.umd.edu> wrote in message
news:91trir$52l$1 at hecate.umd.edu...
> Therefore, my suggestion is really not to remove the colons, but to make
> them optional.  I want opinion of you who have programmed for a long time
> whether there will be some harms if the colons are made optional.  If not,

Speaking as somebody who has been programming for a quarter of a century,
and who's fallen wildly in love with Python since about 18 months ago (and
_deeply_ appreciates by far most of its features, syntactical, semantical,
pragmatical), I don't think there would be any harm in making the colons
optional.  Although they've become second nature for me after most of the
block-starting statements, I keep forgetting to put one after the mandatory
closing parens of each def-statement.  In a language so spare of useless
punctuation as Python most often is, there's something "against the grain"
in having to write as many as _three_ punctuation marks at the end of
a function definition, as in:

    def somefun():

Nothing major, mind you -- the compiler rapidly lets me know each and
every time I forget!-)

> probably someone can tell me how I can forward this suggestion to the core
> Python development team?

I _think_ feature requests can be placed on python.sourceforge.net,
although there may not be a specific place for them that's very
apparent -- but if you file a 'bug' I believe you can characterize it
as a feature-request.


More information about the Python-list mailing list