Skip to content

Commit 6de8aa3

Browse files
authored
importlib/_bootstrap.py: Reduce size of _List instances (GH-114747)
Reduce size of _List instances
1 parent a1332a9 commit 6de8aa3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/importlib/_bootstrap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def _new_module(name):
5353

5454
# For a list that can have a weakref to it.
5555
class _List(list):
56-
pass
56+
__slots__ = ("__weakref__",)
5757

5858

5959
# Copied from weakref.py with some simplifications and modifications unique to

0 commit comments

Comments
 (0)