2020-06-11 09:45:15 -03:00
|
|
|
"""Keywords (from "Grammar/python.gram")
|
2000-02-04 11:10:34 -04:00
|
|
|
|
|
|
|
This file is automatically generated; please don't muck it up!
|
|
|
|
|
|
|
|
To update the symbols in this file, 'cd' to the top directory of
|
2019-03-25 19:01:12 -03:00
|
|
|
the python source tree and run:
|
|
|
|
|
2020-06-11 09:45:15 -03:00
|
|
|
PYTHONPATH=Tools/peg_generator python3 -m pegen.keywordgen \
|
|
|
|
Grammar/Grammar \
|
|
|
|
Grammar/Tokens \
|
|
|
|
Lib/keyword.py
|
2000-02-04 11:10:34 -04:00
|
|
|
|
2019-03-25 19:01:12 -03:00
|
|
|
Alternatively, you can run 'make regen-keyword'.
|
2000-02-04 11:10:34 -04:00
|
|
|
"""
|
1997-03-20 15:45:51 -04:00
|
|
|
|
2020-06-14 23:55:15 -03:00
|
|
|
__all__ = ["iskeyword", "issoftkeyword", "kwlist", "softkwlist"]
|
2001-01-24 02:27:27 -04:00
|
|
|
|
1997-03-20 15:45:51 -04:00
|
|
|
kwlist = [
|
2019-03-25 19:01:12 -03:00
|
|
|
'False',
|
|
|
|
'None',
|
|
|
|
'True',
|
|
|
|
'and',
|
|
|
|
'as',
|
|
|
|
'assert',
|
|
|
|
'async',
|
|
|
|
'await',
|
|
|
|
'break',
|
|
|
|
'class',
|
|
|
|
'continue',
|
|
|
|
'def',
|
|
|
|
'del',
|
|
|
|
'elif',
|
|
|
|
'else',
|
|
|
|
'except',
|
|
|
|
'finally',
|
|
|
|
'for',
|
|
|
|
'from',
|
|
|
|
'global',
|
|
|
|
'if',
|
|
|
|
'import',
|
|
|
|
'in',
|
|
|
|
'is',
|
|
|
|
'lambda',
|
|
|
|
'nonlocal',
|
|
|
|
'not',
|
|
|
|
'or',
|
|
|
|
'pass',
|
|
|
|
'raise',
|
|
|
|
'return',
|
|
|
|
'try',
|
|
|
|
'while',
|
|
|
|
'with',
|
|
|
|
'yield'
|
|
|
|
]
|
2019-03-07 16:38:08 -04:00
|
|
|
|
2020-06-14 23:55:15 -03:00
|
|
|
softkwlist = [
|
|
|
|
|
|
|
|
]
|
|
|
|
|
2003-12-02 03:48:15 -04:00
|
|
|
iskeyword = frozenset(kwlist).__contains__
|
2020-06-14 23:55:15 -03:00
|
|
|
issoftkeyword = frozenset(softkwlist).__contains__
|