[Python-checkins] r64315 - peps/trunk/pep-0372.txt
david.goodger
python-checkins at python.org
Mon Jun 16 22:41:12 CEST 2008
Author: david.goodger
Date: Mon Jun 16 22:41:12 2008
New Revision: 64315
Log:
markup: removed blank lines to make a definition list
Modified:
peps/trunk/pep-0372.txt
Modified: peps/trunk/pep-0372.txt
==============================================================================
--- peps/trunk/pep-0372.txt (original)
+++ peps/trunk/pep-0372.txt Mon Jun 16 22:41:12 2008
@@ -112,7 +112,6 @@
New methods not available on dict:
``odict.byindex(index)``
-
Returns the key/value pair for an index, that is, the "position" of a key in
the ordered dict. 0 is the first key/value pair, -1 the last.
@@ -122,12 +121,10 @@
If there is no key for index an `IndexError` is raised.
``odict.index(key)``
-
Returns the index of a key. If the key does not exist, a `ValueError` is
raised.
``odict.sort(cmp=None, key=None, reverse=False)``
-
Sorts the odict in place by cmp or key. This works exactly like
``list.sort()``, but the comparison functions are passed a key/value tuple,
not only the value.
@@ -136,11 +133,9 @@
collections.odict([(1, 4), (23, 7), (42, 1)])
``odict.reverse()``
-
Reverses the odict in place.
``odict.__reverse__()``
-
Supports reverse iteration by key.
More information about the Python-checkins
mailing list