allowing braces around suites

Isaac To iketo2 at netscape.net
Fri Aug 27 21:39:54 EDT 2004


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

    Kjetil> that's a hack, and IMHO not worthy of a Python program.
    Kjetil> not even Perl has anything like that, AFAIK.

Hm... hacks are not for Python?!  We see every kind of hacks
everywhere in Python just like it is in Perl, like (2,) syntax, etc.
Some hacks are good, some are bad, and some are dependent on who is
looking at it.

I'm neutral on whether this particular hack is nice: if one get used
to "pass", one can train onself psychologically that it means "I've
got nothing else to do, pass to the upper level".  It also doesn't
conflict with the previous use of pass.

I don't know how such logic works for others.  At least, a pass
statement in a non-empty suite won't be used otherwise, so you can use
the convention to end suites safely---and in a way that need no change
at all in the Python interpreter.  And you can use it *now*, since it
is implemented in the default Python mode of Emacs already.

Regards,
Isaac.



More information about the Python-list mailing list