diff options
-rwxr-xr-x | Lib/keyword.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Lib/keyword.py b/Lib/keyword.py new file mode 100755 index 0000000..acee8ff --- /dev/null +++ b/Lib/keyword.py @@ -0,0 +1,37 @@ +"""Export the list of Python keywords (reserved words).""" + +# grep '{1, "' ../Python/graminit.c | sed 's/.*"\(.*\)".*/ "\1",/' | sort + +keywords = [ + "__assert__", + "and", + "break", + "class", + "continue", + "def", + "del", + "elif", + "else", + "except", + "exec", + "finally", + "for", + "from", + "global", + "if", + "import", + "in", + "is", + "lambda", + "not", + "or", + "pass", + "print", + "raise", + "return", + "try", + "while", + ] + +if __name__ == '__main__': + for k in keywords: print k |