summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2010-11-21 00:44:27 (GMT)
committerÉric Araujo <merwok@netwok.org>2010-11-21 00:44:27 (GMT)
commit40a92f5c65767d80ebc3b3be2c2ccfc5db3afb7b (patch)
treea22e3b4cfd412d58d8b20d48d6761d6bbf8a8d40
parent1567e72003a02866525b317c6681c5f89d099b8c (diff)
downloadcpython-40a92f5c65767d80ebc3b3be2c2ccfc5db3afb7b.zip
cpython-40a92f5c65767d80ebc3b3be2c2ccfc5db3afb7b.tar.gz
cpython-40a92f5c65767d80ebc3b3be2c2ccfc5db3afb7b.tar.bz2
Merged revisions 86625 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86625 | eric.araujo | 2010-11-21 00:56:22 +0100 (dim., 21 nov. 2010) | 2 lines Document index and count as part of the Sequence ABC (#9746) ........
-rw-r--r--Doc/library/stdtypes.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index daceddc..7cb92ee 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -739,6 +739,12 @@ are sequences of the same type; *n*, *i* and *j* are integers:
+------------------+--------------------------------+----------+
| ``max(s)`` | largest item of *s* | |
+------------------+--------------------------------+----------+
+| ``s.index(i)`` | index of the first occurence | |
+| | of *i* in *s* | |
++------------------+--------------------------------+----------+
+| ``s.count(i)`` | total number of occurences of | |
+| | *i* in *s* | |
++------------------+--------------------------------+----------+
Sequence types also support comparisons. In particular, tuples and lists
are compared lexicographically by comparing corresponding