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