1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
|