From 91beaa437a15dd36e021a1608e900f83ec87a288 Mon Sep 17 00:00:00 2001 From: Vizonex Date: Thu, 11 Jun 2026 23:51:11 -0500 Subject: [PATCH] apply some __slots__ to pure python types --- immutables/map.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/immutables/map.py b/immutables/map.py index 46227357..c94efd83 100644 --- a/immutables/map.py +++ b/immutables/map.py @@ -61,6 +61,7 @@ class _Unhashable: class BitmapNode: + __slots__ = ("array", "bitmap", "mutid", "size") def __init__(self, size, bitmap, array, mutid): self.size = size @@ -419,6 +420,7 @@ def __iter__(self): class MapValues: + __slots__ = ("__count", "__root") def __init__(self, c, m): self.__count = c @@ -432,6 +434,7 @@ def __iter__(self): class MapItems: + __slots__ = ("__count", "__root") def __init__(self, c, m): self.__count = c @@ -445,7 +448,7 @@ def __iter__(self): class Map: - + __slots__ = ("__weakref__", "__count", "__hash", "__root") def __init__(self, *args, **kw): if not args: col = None