Skip to content

Commit 50f362f

Browse files
committed
Note that ordered dictionaries work with reversed().
1 parent 7d7127d commit 50f362f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎Doc/library/collections.rst‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,9 @@ the items are returned in the order their keys were first added.
868868
a (key, value) pair. The pairs are returned in LIFO order if *last* is
869869
true or FIFO order if false.
870870

871+
In addition to the usual mapping methods, ordered dictionaries also support
872+
reverse iteration using :func:`reversed`.
873+
871874
Equality tests between :class:`OrderedDict` objects are order-sensitive
872875
and are implemented as ``list(od1.items())==list(od2.items())``.
873876
Equality tests between :class:`OrderedDict` objects and other

0 commit comments

Comments
 (0)