]> granicus.if.org Git - python/commitdiff
Note that ordered dictionaries work with reversed().
authorRaymond Hettinger <python@rcn.com>
Tue, 19 May 2009 17:40:07 +0000 (17:40 +0000)
committerRaymond Hettinger <python@rcn.com>
Tue, 19 May 2009 17:40:07 +0000 (17:40 +0000)
Doc/library/collections.rst

index 9dcf3028105a7d4ff10efc047fbab33a7b8b4387..3f5734884e6e254f2b07bd79d8b910ad878b349c 100644 (file)
@@ -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