[Python-ideas] relaxing keyword usage restrictions
Stephen J. Turnbull
stephen at xemacs.org
Mon Sep 5 10:41:11 CEST 2011
H Krishnan writes:
> > Wrong. It's for the community to decide. The python community
> > regularly decides to reject changes for no more reason than they
> > might confuse a reader and provide no real benefit. Your examples
> > show no benefit, and are obviously confusing.
> Not sure I understand this point very well. Could I start a separate
> thread to say that Python should grab 'was' and 'were' as keywords so
> that a user is not able to write:
No, if you're all that serious about messing with the sematics of
keywords, what you should do instead is skim PEPs 221, 318, 343, and
359, and note how much attention is paid to the cost of adding
keywords in the rationales. There may be other good examples.
Executive summary of the PEP list: the cost of keywords like "class"
is well understood; there was a deliberate decision that this cost
would be paid. But there is also strong resistence to adding new ones
that are not absolutely required to implement a new feature.
These same considerations apply to any new syntax in the language; see
Also read PEP 20, aka "python -m this" aka "The Zen of Python."
The Python community considers language development to be an art.
Implicit in that philosophical position is the possibility that you
may not like the result.
It's also possible that you may be able to convince the community of
your position. But that is going to be much more likely (and you are
much less likely to be defeated by windmills) if you understand the
philosophy and tastes behind Python language features. Some of them
may not be obvious unless you are Dutch (I guess you aren't :-), so
PEP 3009 is required reading.
More information about the Python-ideas