summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-05-19 17:40:07 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-05-19 17:40:07 (GMT)
commite90915011cd8a732de294d34a8d05fedfa15db1e (patch)
tree2b767d3d46f8a05f9840d061c7044c02b1b4110d /Doc
parent822eb844006fb78a0551b0f55547b46cf8607e8a (diff)
downloadcpython-e90915011cd8a732de294d34a8d05fedfa15db1e.zip
cpython-e90915011cd8a732de294d34a8d05fedfa15db1e.tar.gz
cpython-e90915011cd8a732de294d34a8d05fedfa15db1e.tar.bz2
Note that ordered dictionaries work with reversed().
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/collections.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 9dcf302..3f57348 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -844,6 +844,9 @@ the items are returned in the order their keys were first added.
a (key, value) pair. The pairs are returned in LIFO order if *last* is
true or FIFO order if false.
+In addition to the usual mapping methods, ordered dictionaries also support
+reverse iteration using :func:`reversed`.
+
Equality tests between :class:`OrderedDict` objects are order-sensitive
and are implemented as ``list(od1.items())==list(od2.items())``.
Equality tests between :class:`OrderedDict` objects and other