diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2002-01-23 22:49:48 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2002-01-23 22:49:48 (GMT) |
commit | 8b0ee24e229be7f57837677c48698f4f470d6637 (patch) | |
tree | 89c49d324ff3f25b462108acb401540225cade7e /Mac | |
parent | c8febecd3c2043a136b07dceb810daa708f59082 (diff) | |
download | cpython-8b0ee24e229be7f57837677c48698f4f470d6637.zip cpython-8b0ee24e229be7f57837677c48698f4f470d6637.tar.gz cpython-8b0ee24e229be7f57837677c48698f4f470d6637.tar.bz2 |
(Much) better list of Python keywords, supplied by Michael J. Barber.
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/scripts/gensuitemodule.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Mac/scripts/gensuitemodule.py b/Mac/scripts/gensuitemodule.py index d9bcdc6..db440cb 100644 --- a/Mac/scripts/gensuitemodule.py +++ b/Mac/scripts/gensuitemodule.py @@ -816,9 +816,11 @@ def compiledataflags(flags): bits.append(`i`) return '[%s]' % string.join(bits) -# XXXX Do we have a set of python keywords somewhere? -illegal_ids = [ "for", "in", "from", "and", "or", "not", "print", "class", "return", - "def" ] +# Set of Python keywords (as of Python 2.2) +illegal_ids = ["and", "elif", "global", "or", "assert", "else", "if", "pass", + "break", "except", "import", "print", "class", "exec", "in", "raise", + "continue", "finally", "is", "return", "def", "for", "lambda", "try", + "del", "from", "not", "while"] def identify(str): """Turn any string into an identifier: |