There was an error while loading. Please reload this page.
1 parent 31ad7e0 commit e31d65eCopy full SHA for e31d65e
1 file changed
Doc/library/stdtypes.rst
@@ -4755,14 +4755,17 @@ support membership tests:
4755
4756
.. versionadded:: 3.10
4757
4758
-Keys views are set-like since their entries are unique and :term:`hashable`. If all
4759
-values are hashable, so that ``(key, value)`` pairs are unique and hashable,
4760
-then the items view is also set-like. (Values views are not treated as set-like
+Keys views are set-like since their entries are unique and :term:`hashable`.
+Items views also have set-like operations since the (key, value) pairs
+are unique and the keys are hashable.
4761
+If all values in an items view are hashable as well,
4762
+then the items view can interoperate with other sets.
4763
+(Values views are not treated as set-like
4764
since the entries are generally not unique.) For set-like views, all of the
4765
operations defined for the abstract base class :class:`collections.abc.Set` are
4766
available (for example, ``==``, ``<``, or ``^``). While using set operators,
-set-like views accept any iterable as the other operand, unlike sets which only
-accept sets as the input.
4767
+set-like views accept any iterable as the other operand,
4768
+unlike sets which only accept sets as the input.
4769
4770
An example of dictionary view usage::
4771
0 commit comments