[Python-Dev] How about a meta-reserved word? (was: Extended Function syntax)

Jack Jansen Jack.Jansen@oratrix.com
Sat, 1 Feb 2003 00:57:53 +0100


I'm going off on a tangent (again, as usual:-), but would it be an idea 
to add a "meta-reserved-word" to Python, so it would become easier to 
add new constructions to the language?

What I envision is something (let's call it "keyword" for now, even 
though that's probably a bad choice) that we could use to make an 
identifier a keyword. So, if we're discussing a
lock .....:
     <block>
statement at some point this would be implemented in 2.N as
keyword(lock) ....:
     <block>
with lock not a reserved word (but it would generate future warnings). 
In 2.N+1 lock would become a reserved word. But: keyword(lock) would 
also continue to work for all eternity. (And, as a corollary, you could 
use keyword(class) and any other construct too).

I don't have intimate knowledge of the workings of the parser, but I 
can't imagine that this would be difficult on that account.
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma 
Goldman -