From 726a57d45f8606ad5a33f7c6bbd1e8c2f8cfbdef Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 22 Nov 2016 23:04:39 +0100 Subject: Issue #28765: _sre.compile() now checks the type of groupindex and indexgroup groupindex must a dictionary and indexgroup must be a tuple. Previously, indexgroup was a list. Use a tuple to reduce the memory usage. --- Lib/sre_compile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/sre_compile.py') diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py index 420d83de63..2cc39007ac 100644 --- a/Lib/sre_compile.py +++ b/Lib/sre_compile.py @@ -576,5 +576,5 @@ def compile(p, flags=0): return _sre.compile( pattern, flags | p.pattern.flags, code, p.pattern.groups-1, - groupindex, indexgroup + groupindex, tuple(indexgroup) ) -- cgit v1.2.1