Skip to content

Commit b4d100c

Browse files
committed
Bug #1763149: use proper slice syntax in docstring.
(backport)
1 parent 00247d8 commit b4d100c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎Objects/stringobject.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1890,7 +1890,7 @@ PyDoc_STRVAR(find__doc__,
18901890
"S.find(sub [,start [,end]]) -> int\n\
18911891
\n\
18921892
Return the lowest index in S where substring sub is found,\n\
1893-
such that sub is contained within s[start,end]. Optional\n\
1893+
such that sub is contained within s[start:end]. Optional\n\
18941894
arguments start and end are interpreted as in slice notation.\n\
18951895
\n\
18961896
Return -1 on failure.");
@@ -1929,7 +1929,7 @@ PyDoc_STRVAR(rfind__doc__,
19291929
"S.rfind(sub [,start [,end]]) -> int\n\
19301930
\n\
19311931
Return the highest index in S where substring sub is found,\n\
1932-
such that sub is contained within s[start,end]. Optional\n\
1932+
such that sub is contained within s[start:end]. Optional\n\
19331933
arguments start and end are interpreted as in slice notation.\n\
19341934
\n\
19351935
Return -1 on failure.");

‎Objects/unicodeobject.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5757,7 +5757,7 @@ PyDoc_STRVAR(find__doc__,
57575757
"S.find(sub [,start [,end]]) -> int\n\
57585758
\n\
57595759
Return the lowest index in S where substring sub is found,\n\
5760-
such that sub is contained within s[start,end]. Optional\n\
5760+
such that sub is contained within s[start:end]. Optional\n\
57615761
arguments start and end are interpreted as in slice notation.\n\
57625762
\n\
57635763
Return -1 on failure.");
@@ -6498,7 +6498,7 @@ PyDoc_STRVAR(rfind__doc__,
64986498
"S.rfind(sub [,start [,end]]) -> int\n\
64996499
\n\
65006500
Return the highest index in S where substring sub is found,\n\
6501-
such that sub is contained within s[start,end]. Optional\n\
6501+
such that sub is contained within s[start:end]. Optional\n\
65026502
arguments start and end are interpreted as in slice notation.\n\
65036503
\n\
65046504
Return -1 on failure.");

0 commit comments

Comments
 (0)