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
9fa63749
Commit
9fa63749
authored
Dec 24, 2016
by
Martin Panter
Browse files
Options
Browse Files
Download
Plain Diff
Issue #1446619: Merge slicing description from 3.6
parents
9e40afe2
0efb5b35
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
Doc/library/stdtypes.rst
Doc/library/stdtypes.rst
+4
-2
No files found.
Doc/library/stdtypes.rst
View file @
9fa63749
...
...
@@ -942,8 +942,10 @@ Notes:
The slice of *s* from *i* to *j* with step *k* is defined as the sequence of
items with index ``x = i + n*k`` such that ``0 <= n < (j-i)/k``. In other words,
the indices are ``i``, ``i+k``, ``i+2*k``, ``i+3*k`` and so on, stopping when
*j* is reached (but never including *j*). If *i* or *j* is greater than
``len(s)``, use ``len(s)``. If *i* or *j* are omitted or ``None``, they become
*j* is reached (but never including *j*). When *k* is positive,
*i* and *j* are reduced to ``len(s)`` if they are greater.
When *k* is negative, *i* and *j* are reduced to ``len(s) - 1`` if
they are greater. If *i* or *j* are omitted or ``None``, they become
"end" values (which end depends on the sign of *k*). Note, *k* cannot be zero.
If *k* is ``None``, it is treated like ``1``.
...
...
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