Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1757)

#29352: provide the authorative source for s[i:j] negative slice indices (<-len(s)) behavior for standard sequences

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 months ago by 4kir4.1i
Modified:
5 months ago
Reviewers:
shadowranger+python
CC:
rhettinger, StephenTurnbull, docs_python.org, akira, josh.rosenberg
Visibility:
Public.

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/stdtypes.rst View 1 chunk +3 lines, -3 lines 1 comment Download

Messages

Total messages: 1
josh.rosenberg
5 months ago #1
https://bugs.python.org/review/29352/diff/19815/Doc/library/stdtypes.rst
File Doc/library/stdtypes.rst (right):

https://bugs.python.org/review/29352/diff/19815/Doc/library/stdtypes.rst#newc...
Doc/library/stdtypes.rst:937: ``len(s)``. If ``len(s) + i`` or ``len(s) + j`` is
negative, use ``0``. If *i*
I think, to avoid repetition, a footnote cross-reference might make more sense
here:

"If a negative index remains negative after substitution (Note 3), use ``0``."

Or if footnote cross-references are verboten, to match the phrasing for the
previous sentence and simplify the language:

"If *i* or *j* is less than ``-len(s)``, use ``0``."
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7