summaryrefslogtreecommitdiffstats
path: root/Lib/keyword.py
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2020-06-15 02:55:15 (GMT)
committerGitHub <noreply@github.com>2020-06-15 02:55:15 (GMT)
commit78319e373d57cd4da67660f888aa7092efbd6f24 (patch)
tree86d96b4d90d163309922d429670bfac3f8d40de3 /Lib/keyword.py
parent10c3b2120afa01b2c310ac50e99d8b98c943b0a2 (diff)
downloadcpython-78319e373d57cd4da67660f888aa7092efbd6f24.zip
cpython-78319e373d57cd4da67660f888aa7092efbd6f24.tar.gz
cpython-78319e373d57cd4da67660f888aa7092efbd6f24.tar.bz2
Include soft keywords in keyword.py (GH-20877)
Diffstat (limited to 'Lib/keyword.py')
-rw-r--r--Lib/keyword.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/keyword.py b/Lib/keyword.py
index b6a9982..ccc9515 100644
--- a/Lib/keyword.py
+++ b/Lib/keyword.py
@@ -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__