mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Note that ordered dictionaries work with reversed().
This commit is contained in:
parent
7d7127dd84
commit
50f362fffa
1 changed files with 3 additions and 0 deletions
|
@ -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
|
a (key, value) pair. The pairs are returned in LIFO order if *last* is
|
||||||
true or FIFO order if false.
|
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
|
Equality tests between :class:`OrderedDict` objects are order-sensitive
|
||||||
and are implemented as ``list(od1.items())==list(od2.items())``.
|
and are implemented as ``list(od1.items())==list(od2.items())``.
|
||||||
Equality tests between :class:`OrderedDict` objects and other
|
Equality tests between :class:`OrderedDict` objects and other
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue