1 """Keywords (from "Grammar/python.gram")
2
3 This file is automatically generated; please don't muck it up!
4
5 To update the symbols in this file, 'cd' to the top directory of
6 the python source tree and run:
7
8 PYTHONPATH=Tools/peg_generator python3 -m pegen.keywordgen \
9 Grammar/python.gram \
10 Grammar/Tokens \
11 Lib/keyword.py
12
13 Alternatively, you can run 'make regen-keyword'.
14 """
15
16 __all__ = ["iskeyword", "issoftkeyword", "kwlist", "softkwlist"]
17
18 kwlist = [
19 'False',
20 'None',
21 'True',
22 'and',
23 'as',
24 'assert',
25 'async',
26 'await',
27 'break',
28 'class',
29 'continue',
30 'def',
31 'del',
32 'elif',
33 'else',
34 'except',
35 'finally',
36 'for',
37 'from',
38 'global',
39 'if',
40 'import',
41 'in',
42 'is',
43 'lambda',
44 'nonlocal',
45 'not',
46 'or',
47 'pass',
48 'raise',
49 'return',
50 'try',
51 'while',
52 'with',
53 'yield'
54 ]
55
56 softkwlist = [
57 '_',
58 'case',
59 'match'
60 ]
61
62 iskeyword = frozenset(kwlist).__contains__
63 issoftkeyword = frozenset(softkwlist).__contains__