]> granicus.if.org Git - python/commitdiff
Merged revisions 86625 via svnmerge from
authorÉric Araujo <merwok@netwok.org>
Sun, 21 Nov 2010 00:43:28 +0000 (00:43 +0000)
committerÉric Araujo <merwok@netwok.org>
Sun, 21 Nov 2010 00:43:28 +0000 (00:43 +0000)
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)
........

Doc/library/stdtypes.rst

index 783b750e0d2437aae450ea24c34935ee1ef96bc3..7641e63955e3cbc727299d39f4a792770a61857b 100644 (file)
@@ -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