summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2010-11-21 00:43:28 (GMT)
committerÉric Araujo <merwok@netwok.org>2010-11-21 00:43:28 (GMT)
commitb65b4937e20be4a2d3311326909c77bbf2e1c4cd (patch)
tree6f7c36ad3e45abe1d768485da6e2b90cab9c1f63
parent91f87788f061798ca7879279119b22319c81c550 (diff)
downloadcpython-b65b4937e20be4a2d3311326909c77bbf2e1c4cd.zip
cpython-b65b4937e20be4a2d3311326909c77bbf2e1c4cd.tar.gz
cpython-b65b4937e20be4a2d3311326909c77bbf2e1c4cd.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 783b750..7641e63 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -711,6 +711,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 elements. This means that