class KeysView(MappingView, Set):
+ @classmethod
+ def _from_iterable(self, it):
+ return set(it)
+
def __contains__(self, key):
return key in self._mapping
class ItemsView(MappingView, Set):
+ @classmethod
+ def _from_iterable(self, it):
+ return set(it)
+
def __contains__(self, item):
key, value = item
try:
Library
-------
+- Issue #9214: Set operations on KeysView or ItemsView in the collections
+ module now correctly return a set. (Patch by Eli Bendersky.)
+
- Issue #9617: Signals received during a low-level write operation aren't
ignored by the buffered IO layer anymore.