Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
fcf58a15
Commit
fcf58a15
authored
Oct 03, 2015
by
Martin Panter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #16701: Document += and *= for mutable sequences
parent
74c76c8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
Doc/library/stdtypes.rst
Doc/library/stdtypes.rst
+11
-2
No files found.
Doc/library/stdtypes.rst
View file @
fcf58a15
...
...
@@ -1613,8 +1613,11 @@ an arbitrary object):
| ``s.append(x)`` | same as ``s[len(s):len(s)] = | \(2) |
| | [x]`` | |
+------------------------------+--------------------------------+---------------------+
| ``s.extend(x)`` | same as ``s[len(s):len(s)] = | \(3) |
| | 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)
The value *n* is an integer, or an object implementing
:meth:`~object.__index__`. Zero and negative values of *n* clear
the sequence. Items in the sequence are not copied; they are referenced
multiple times, as explained for ``s * n`` under :ref:`typesseq`.
.. _types-set:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment