Include soft keywords in keyword.py (GH-20877)

This commit is contained in:
Pablo Galindo 2020-06-15 03:55:15 +01:00 committed by GitHub
parent 10c3b2120a
commit 78319e373d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 5 deletions

View file

@ -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__