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 \
|
2020-07-26 12:27:52 -03:00
|
|
|
Grammar/python.gram \
|
2020-06-11 09:45:15 -03:00
|
|
|
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 = [
|
2021-02-26 18:51:55 -04:00
|
|
|
'_',
|
|
|
|
'case',
|
2023-05-16 00:36:23 -03:00
|
|
|
'match',
|
|
|
|
'type'
|
2020-06-14 23:55:15 -03:00
|
|
|
]
|
|
|
|
|
2003-12-02 03:48:15 -04:00
|
|
|
iskeyword = frozenset(kwlist).__contains__
|
2020-06-14 23:55:15 -03:00
|
|
|
issoftkeyword = frozenset(softkwlist).__contains__
|