summaryrefslogtreecommitdiffstats
path: root/Lib/keyword.py
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2020-06-15 03:31:05 (GMT)
committerGitHub <noreply@github.com>2020-06-15 03:31:05 (GMT)
commit145fa86598b850e9ee0efed413dec9ec5e4431b1 (patch)
treef6102dae64cf5caa63a665946dce856f6f0627af /Lib/keyword.py
parent8a3469047c3c7b68f434ed244ef3ae4292dd8cbc (diff)
downloadcpython-145fa86598b850e9ee0efed413dec9ec5e4431b1.zip
cpython-145fa86598b850e9ee0efed413dec9ec5e4431b1.tar.gz
cpython-145fa86598b850e9ee0efed413dec9ec5e4431b1.tar.bz2
[3.9] Include soft keywords in keyword.py (GH-20877). (GH-20880)
(cherry picked from commit 78319e373d57cd4da67660f888aa7092efbd6f24) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
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 a4db67e..59fcfb0 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',
@@ -54,4 +54,9 @@ kwlist = [
'yield'
]
+softkwlist = [
+
+]
+
iskeyword = frozenset(kwlist).__contains__
+issoftkeyword = frozenset(softkwlist).__contains__