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
522a3277
Commit
522a3277
authored
Oct 03, 2015
by
Martin Panter
Browse files
Options
Browse Files
Download
Plain Diff
Issue #16701: Merge sequence docs from 3.4 into 3.5
parents
ad312ae9
93aebda8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
Doc/library/stdtypes.rst
Doc/library/stdtypes.rst
+12
-2
No files found.
Doc/library/stdtypes.rst
View file @
522a3277
...
...
@@ -1063,10 +1063,14 @@ accepts integers that meet the value restriction ``0 <= x <= 255``).
| ``s.copy()`` | creates a shallow copy of ``s``| \(5) |
| | (same as ``s[:]``) | |
+------------------------------+--------------------------------+---------------------+
| ``s.extend(t)`` | extends *s* with the | |
| | contents of *t* (same as | |
| ``s.extend(t)`` or | extends *s* with the | |
| ``s += t`` | contents of *t* (for the | |
| | most part the same as | |
| | ``s[len(s):len(s)] = t``) | |
+------------------------------+--------------------------------+---------------------+
| ``s *= n`` | updates *s* with its contents | \(6) |
| | repeated *n* times | |
+------------------------------+--------------------------------+---------------------+
| ``s.insert(i, x)`` | inserts *x* into *s* at the | |
| | index given by *i* | |
| | (same as ``s[i:i] = [x]``) | |
...
...
@@ -1107,6 +1111,12 @@ Notes:
.. versionadded:: 3.3
:meth:`clear` and :meth:`!copy` methods.
(6)
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-common`.
.. _typesseq-list:
...
...
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