Skip to content

Commit d9157c3

Browse files
Eclips4aisk
authored andcommitted
importlib/_bootstrap.py: Reduce size of _List instances (pythonGH-114747)
Reduce size of _List instances
1 parent 2690a1a commit d9157c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/importlib/_bootstrap.py

+1-1
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)