summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/_bootstrap.py
diff options
context:
space:
mode:
authorKirill Podoprigora <kirill.bast9@mail.ru>2024-01-30 18:44:09 (GMT)
committerGitHub <noreply@github.com>2024-01-30 18:44:09 (GMT)
commit6de8aa31f39b3d8dbfba132e6649724eb07b8348 (patch)
treecfd6026bcd288a0bd39cdbc24875000f55df2b30 /Lib/importlib/_bootstrap.py
parenta1332a99cf1eb9b879d4b1f28761b096b5749a0d (diff)
downloadcpython-6de8aa31f39b3d8dbfba132e6649724eb07b8348.zip
cpython-6de8aa31f39b3d8dbfba132e6649724eb07b8348.tar.gz
cpython-6de8aa31f39b3d8dbfba132e6649724eb07b8348.tar.bz2
``importlib/_bootstrap.py``: Reduce size of ``_List`` instances (GH-114747)
Reduce size of _List instances
Diffstat (limited to 'Lib/importlib/_bootstrap.py')
-rw-r--r--Lib/importlib/_bootstrap.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py
index d942045..6d6292f 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