summaryrefslogtreecommitdiffstats
path: root/Lib/tokenize.py
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2022-02-03 09:20:08 (GMT)
committerGitHub <noreply@github.com>2022-02-03 09:20:08 (GMT)
commit0cbdd2131195b0d313762968f604e80a3e65ca9f (patch)
tree3f512c22e4ef6bbfc9d2246ad26446271e0e3ce7 /Lib/tokenize.py
parent6394e981adaca2c0daa36c8701611e250d74024c (diff)
downloadcpython-0cbdd2131195b0d313762968f604e80a3e65ca9f.zip
cpython-0cbdd2131195b0d313762968f604e80a3e65ca9f.tar.gz
cpython-0cbdd2131195b0d313762968f604e80a3e65ca9f.tar.bz2
bpo-46565: `del` loop vars that are leaking into module namespaces (GH-30993)
Diffstat (limited to 'Lib/tokenize.py')
-rw-r--r--Lib/tokenize.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/tokenize.py b/Lib/tokenize.py
index 0b9e238..46d2224 100644
--- a/Lib/tokenize.py
+++ b/Lib/tokenize.py
@@ -143,6 +143,7 @@ for _prefix in _all_string_prefixes():
endpats[_prefix + '"'] = Double
endpats[_prefix + "'''"] = Single3
endpats[_prefix + '"""'] = Double3
+del _prefix
# A set of all of the single and triple quoted string prefixes,
# including the opening quotes.
@@ -153,6 +154,7 @@ for t in _all_string_prefixes():
single_quoted.add(u)
for u in (t + '"""', t + "'''"):
triple_quoted.add(u)
+del t, u
tabsize = 8