[Python-Dev] Next-to-last wart in Python syntax.

Barry A. Warsaw barry@digicool.com
Mon, 12 Mar 2001 18:48:21 -0500


>>>>> "GvR" == Guido van Rossum <guido@digicool.com> writes:

    GvR> Yes, that was on the list once but got dropped.  You might
    GvR> want to get together with Finn and Samuele to see what their
    GvR> rules are.  (They allow the use of some keywords at least as
    GvR> keyword=expression arguments and as object.attribute names.)

I'm actually a little surprised that the "Jython vs. CPython"
differences page doesn't describe this (or am I missing it?):

    http://www.jython.org/docs/differences.html

I thought it used to.

IIRC, keywords were allowed if there was no question of it introducing
a statement.  So yes, keywords were allowed after the dot in attribute
lookups, and as keywords in argument lists, but not as variable names
on the lhs of an assignment (I don't remember if they were legal on
the rhs, but it seems like that ought to be okay, and is actually
necessary if you allow them argument lists).

It would eliminate much of the need for writing obfuscated code like
"class_" or "klass".

-Barry