mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
* Preserve pyrepl console mock guards during migration Keep the existing three named-function decorator workarounds and their explanations at exact audited anchors. Reject changed canonical or local preambles, and retain canonical test bodies. Assisted-by: OpenAI Codex:model version unavailable * Update pyrepl rendering and completion for Python 3.15 Sync the complete _pyrepl package and rlcompleter with CPython d220409a13b77de7a6c30abe16ea90db01528edc using scripts/update_lib copy-lib. Migrate the complete test_pyrepl package and existing repl/completion consumers, preserving existing RustPython guards and canonical assertions. This is a source checkpoint. Interpreter, PTY, native platform, workspace, C-API and Clippy validation remain pending; host updater tests and configured commit hooks passed. Assisted-by: OpenAI Codex:model version unavailable * Include lazy soft keyword for canonical REPL highlighting Assisted-by: OpenAI Codex:model version unavailable
66 lines
1.1 KiB
Python
Vendored
Generated
66 lines
1.1 KiB
Python
Vendored
Generated
"""Keywords (from "Grammar/python.gram")
|
|
|
|
This file is automatically generated; please don't muck it up!
|
|
|
|
To update the symbols in this file, 'cd' to the top directory of
|
|
the python source tree and run:
|
|
|
|
PYTHONPATH=Tools/peg_generator python3 -m pegen.keywordgen \
|
|
Grammar/python.gram \
|
|
Grammar/Tokens \
|
|
Lib/keyword.py
|
|
|
|
Alternatively, you can run 'make regen-keyword'.
|
|
"""
|
|
|
|
__all__ = ["iskeyword", "issoftkeyword", "kwlist", "softkwlist"]
|
|
|
|
kwlist = [
|
|
'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'
|
|
]
|
|
|
|
softkwlist = [
|
|
'_',
|
|
'case',
|
|
'lazy',
|
|
'match',
|
|
'type'
|
|
]
|
|
|
|
iskeyword = frozenset(kwlist).__contains__
|
|
issoftkeyword = frozenset(softkwlist).__contains__
|