summaryrefslogtreecommitdiff
path: root/Lib/_collections_abc.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/_collections_abc.py')
-rw-r--r--Lib/_collections_abc.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py
index 33b59aba1b..3d3f07b92e 100644
--- a/Lib/_collections_abc.py
+++ b/Lib/_collections_abc.py
@@ -453,6 +453,8 @@ Mapping.register(mappingproxy)
class MappingView(Sized):
+ __slots__ = '_mapping',
+
def __init__(self, mapping):
self._mapping = mapping
@@ -465,6 +467,8 @@ class MappingView(Sized):
class KeysView(MappingView, Set):
+ __slots__ = ()
+
@classmethod
def _from_iterable(self, it):
return set(it)
@@ -480,6 +484,8 @@ KeysView.register(dict_keys)
class ItemsView(MappingView, Set):
+ __slots__ = ()
+
@classmethod
def _from_iterable(self, it):
return set(it)
@@ -502,6 +508,8 @@ ItemsView.register(dict_items)
class ValuesView(MappingView):
+ __slots__ = ()
+
def __contains__(self, value):
for key in self._mapping:
if value == self._mapping[key]: