mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
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) ........
This commit is contained in:
parent
1567e72003
commit
40a92f5c65
1 changed files with 6 additions and 0 deletions
|
@ -739,6 +739,12 @@ are sequences of the same type; *n*, *i* and *j* are integers:
|
||||||
+------------------+--------------------------------+----------+
|
+------------------+--------------------------------+----------+
|
||||||
| ``max(s)`` | largest item of *s* | |
|
| ``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
|
Sequence types also support comparisons. In particular, tuples and lists
|
||||||
are compared lexicographically by comparing corresponding
|
are compared lexicographically by comparing corresponding
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue