From: Benjamin Peterson Date: Sat, 5 Dec 2015 08:29:56 +0000 (-0800) Subject: make consulting save_modules O(1) rather than O(n) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f9d11e815a6d671714c27bd8d5ab2f4922c3eec6;p=python make consulting save_modules O(1) rather than O(n) --- diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 0007da64b8..5239d5a246 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -462,7 +462,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, test_times = [] test_support.use_resources = use_resources - save_modules = sys.modules.keys() + save_modules = set(sys.modules.keys()) def accumulate_result(test, result): ok, test_time = result