mirror of
https://github.com/python/cpython
synced 2024-09-05 16:38:56 +00:00
38 lines
566 B
Python
Executable file
38 lines
566 B
Python
Executable file
"""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
|