cpython: ec373d762213 (original) (raw)
Mercurial > cpython
changeset 98517:ec373d762213 2.7
Issue #16701: Document += and *= for mutable sequences [#16701]
Martin Panter vadmium+py@gmail.com | |
---|---|
date | Sat, 03 Oct 2015 07:37:22 +0000 |
parents | a4302005f9a2 |
children | afa95f032de1 |
files | Doc/library/stdtypes.rst |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-)[+] [-] Doc/library/stdtypes.rst 13 |
line wrap: on
line diff
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -1613,8 +1613,11 @@ an arbitrary object):
| s.append(x)
| same as s[len(s):len(s)] = | \(2) |[](#l1.4) | | [x]
| |
+------------------------------+--------------------------------+---------------------+
-| s.extend(x)
| same as s[len(s):len(s)] = | \(3) |[](#l1.7) -| | x
| |
+| s.extend(x)
or | for the most part the same as | (3) |
+| s += t
| s[len(s):len(s)] = x
| |
++------------------------------+--------------------------------+---------------------+
+| s *= n
| updates s with its contents | (11) |
+| | repeated n times | |
+------------------------------+--------------------------------+---------------------+
| s.count(x)
| return number of i's for | |
| | which s[i] == x
| |
@@ -1720,6 +1723,12 @@ Notes:
:exc:ValueError
if it can detect that the list has been mutated during a
sort.
+(11)