allowing braces around suites

Isaac To iketo2 at netscape.net
Fri Aug 27 21:50:33 EDT 2004


>>>>> "Kjetil" == Kjetil Torgrim Homme <kjetilho at yksi.ifi.uio.no> writes:

    Kjetil> I find this attitude a little defensive.  Python has much
    Kjetil> more to offer than just strict indentation.  although it's
    Kjetil> probably the feature you notice first, it's not enough to
    Kjetil> make Python a superior language.

For me, it is *the* feature that make it stands out from the scripting
crowd.  There are other things nice in Python, but as long as there is
one big enough killing feature, people will use the language enough to
add others.

    Kjetil> after all, code in _any_ language written by a
    Kjetil> professional will have strict indentation.  so it's just
    Kjetil> syntax.

No.  In all other languages, people deal with *two* ways to find which
statement is associated with an if/while/for/whatever statement and
which is not: by looking at the indentation, and by looking at the
braces.  They normally look at the indentation, since it is the
quicker way.  But when they find something wrong, they look at the
defining braces, sometimes deeply hidden in long expressions and
statements combined into one line.  In Python, we have *one and only
one* way to find which statement is associated with an
if/while/for/whatever statement, and this is the quicker way that
people are used to.  This single feature reduces the amount of bugs
that you would introduce when editing and modifying code.  More
importantly, this single feature allows you to be much less stressed
when editing code.

Regards,
Isaac.



More information about the Python-list mailing list