From 978e421bfe0c5c7b7642000f7493c35d76904c8e Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Tue, 30 Jan 2024 10:49:18 +0200 Subject: [PATCH] Reduce size of _List instances --- Lib/importlib/_bootstrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index d942045f3de666..6d6292f9559253 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -53,7 +53,7 @@ def _new_module(name): # For a list that can have a weakref to it. class _List(list): - pass + __slots__ = ("__weakref__",) # Copied from weakref.py with some simplifications and modifications unique to