• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"""Keywords (from "Grammar/Grammar")
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    python3 -m Parser.pgen.keywordgen Grammar/Grammar \
9                                      Grammar/Tokens \
10                                      Lib/keyword.py
11
12Alternatively, you can run 'make regen-keyword'.
13"""
14
15__all__ = ["iskeyword", "kwlist"]
16
17kwlist = [
18    'False',
19    'None',
20    'True',
21    'and',
22    'as',
23    'assert',
24    'async',
25    'await',
26    'break',
27    'class',
28    'continue',
29    'def',
30    'del',
31    'elif',
32    'else',
33    'except',
34    'finally',
35    'for',
36    'from',
37    'global',
38    'if',
39    'import',
40    'in',
41    'is',
42    'lambda',
43    'nonlocal',
44    'not',
45    'or',
46    'pass',
47    'raise',
48    'return',
49    'try',
50    'while',
51    'with',
52    'yield'
53]
54
55iskeyword = frozenset(kwlist).__contains__
56