From 0cbdd2131195b0d313762968f604e80a3e65ca9f Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Thu, 3 Feb 2022 12:20:08 +0300 Subject: bpo-46565: `del` loop vars that are leaking into module namespaces (GH-30993) --- Lib/tokenize.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Lib/tokenize.py') diff --git a/Lib/tokenize.py b/Lib/tokenize.py index 0b9e238310..46d2224f5c 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 -- cgit v1.2.1