summaryrefslogtreecommitdiffstats
path: root/Doc/reference/datamodel.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-05-25 21:13:36 (GMT)
committerGeorg Brandl <georg@python.org>2009-05-25 21:13:36 (GMT)
commit8a1e4c4b6433522ff20528e87b642e4316bd2bd6 (patch)
tree34f4e397b78bfa4d45ff63fd569b22a5320e4993 /Doc/reference/datamodel.rst
parent0c31562a913e9a49842bd73c04847861c23774f1 (diff)
downloadcpython-8a1e4c4b6433522ff20528e87b642e4316bd2bd6.zip
cpython-8a1e4c4b6433522ff20528e87b642e4316bd2bd6.tar.gz
cpython-8a1e4c4b6433522ff20528e87b642e4316bd2bd6.tar.bz2
Merged revisions 72661,72675-72677,72679,72712,72801,72820 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r72661 | georg.brandl | 2009-05-15 10:03:03 +0200 (Fr, 15 Mai 2009) | 1 line Fix example output for doctest-like demos. ........ r72675 | georg.brandl | 2009-05-16 13:13:21 +0200 (Sa, 16 Mai 2009) | 1 line #6034: clarify __reversed__ doc. ........ r72676 | georg.brandl | 2009-05-16 13:14:46 +0200 (Sa, 16 Mai 2009) | 1 line #6025: fix signature of parse(). ........ r72677 | georg.brandl | 2009-05-16 13:18:55 +0200 (Sa, 16 Mai 2009) | 1 line #6009: undocument default argument of Option as deprecated. ........ r72679 | georg.brandl | 2009-05-16 13:24:41 +0200 (Sa, 16 Mai 2009) | 1 line Fix about and bugs pages to match real workflow. ........ r72712 | georg.brandl | 2009-05-17 10:55:00 +0200 (So, 17 Mai 2009) | 1 line #5935: mention that BROWSER is looked for in PATH. ........ r72801 | georg.brandl | 2009-05-20 20:31:14 +0200 (Mi, 20 Mai 2009) | 1 line #6055: refer to "sqlite3" consistently. ........ r72820 | georg.brandl | 2009-05-22 09:23:32 +0200 (Fr, 22 Mai 2009) | 1 line Use raise X(y). ........
Diffstat (limited to 'Doc/reference/datamodel.rst')
-rw-r--r--Doc/reference/datamodel.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 83d2358..2161706 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1700,11 +1700,11 @@ through the container; for mappings, :meth:`__iter__` should be the same as
reverse iteration. It should return a new iterator object that iterates
over all the objects in the container in reverse order.
- If the :meth:`__reversed__` method is not provided, the
- :func:`reversed` builtin will fall back to using the sequence protocol
- (:meth:`__len__` and :meth:`__getitem__`). Objects should normally
- only provide :meth:`__reversed__` if they do not support the sequence
- protocol and an efficient implementation of reverse iteration is possible.
+ If the :meth:`__reversed__` method is not provided, the :func:`reversed`
+ builtin will fall back to using the sequence protocol (:meth:`__len__` and
+ :meth:`__getitem__`). Objects that support the sequence protocol should
+ only provide :meth:`__reversed__` if they can provide an implementation
+ that is more efficient than the one provided by :func:`reversed`.
The membership test operators (:keyword:`in` and :keyword:`not in`) are normally