mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
Include soft keywords in keyword.py (GH-20877)
This commit is contained in:
parent
10c3b2120a
commit
78319e373d
3 changed files with 19 additions and 5 deletions
|
|
@ -13,7 +13,7 @@ the python source tree and run:
|
|||
Alternatively, you can run 'make regen-keyword'.
|
||||
"""
|
||||
|
||||
__all__ = ["iskeyword", "kwlist"]
|
||||
__all__ = ["iskeyword", "issoftkeyword", "kwlist", "softkwlist"]
|
||||
|
||||
kwlist = [
|
||||
'False',
|
||||
|
|
@ -53,4 +53,9 @@ kwlist = [
|
|||
'yield'
|
||||
]
|
||||
|
||||
softkwlist = [
|
||||
|
||||
]
|
||||
|
||||
iskeyword = frozenset(kwlist).__contains__
|
||||
issoftkeyword = frozenset(softkwlist).__contains__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue