projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4576b54
)
bpo-37585: Add clarification regarding comparing dict.values() (GH-14954)
author
Kyle Stanley
<aeros167@gmail.com>
Wed, 11 Sep 2019 10:01:41 +0000
(06:01 -0400)
committer
Brett Cannon
<54418+brettcannon@users.noreply.github.com>
Wed, 11 Sep 2019 10:01:41 +0000
(11:01 +0100)
Doc/library/stdtypes.rst
patch
|
blob
|
history
diff --git
a/Doc/library/stdtypes.rst
b/Doc/library/stdtypes.rst
index 0a565c3e5b6b8c24d317aa62460293b5ec5ef78f..c78f4ba8f068d1bb39e57a7f31fd3daf7e0414f1 100644
(file)
--- a/
Doc/library/stdtypes.rst
+++ b/
Doc/library/stdtypes.rst
@@
-4357,6
+4357,14
@@
pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` or ``{4098:
Return a new view of the dictionary's values. See the
:ref:`documentation of view objects <dict-views>`.
+ An equality comparison between one ``dict.values()`` view and another
+ will always return ``False``. This also applies when comparing
+ ``dict.values()`` to itself::
+
+ >>> d = {'a': 1}
+ >>> d.values() == d.values()
+ False
+
Dictionaries compare equal if and only if they have the same ``(key,
value)`` pairs. Order comparisons ('<', '<=', '>=', '>') raise
:exc:`TypeError`.