diff options
author | Raymond Hettinger <python@rcn.com> | 2009-05-19 17:43:59 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2009-05-19 17:43:59 (GMT) |
commit | 50f362fffa768e17544f29eb6001fbb3d86c02aa (patch) | |
tree | e83de8115ad13fdfd78ff9f02e83c09d50596552 /Doc/library | |
parent | 7d7127dd84189bf9325ef3fc5f3c18359fa34f30 (diff) | |
download | cpython-50f362fffa768e17544f29eb6001fbb3d86c02aa.zip cpython-50f362fffa768e17544f29eb6001fbb3d86c02aa.tar.gz cpython-50f362fffa768e17544f29eb6001fbb3d86c02aa.tar.bz2 |
Note that ordered dictionaries work with reversed().
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/collections.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst index eaab33e..5475776 100644 --- a/Doc/library/collections.rst +++ b/Doc/library/collections.rst @@ -868,6 +868,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 |