8000 gh-117431: Amend str method signatures after PR #117468 · erlend-aasland/cpython@5ea33ed · GitHub
[go: up one dir, main page]

Skip to content

Commit 5ea33ed

Browse files
pythongh-117431: Amend str method signatures after PR python#117468
1 parent 62aeb0e commit 5ea33ed

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

Objects/clinic/unicodeobject.c.h

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Objects/unicodeobject.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11254,6 +11254,7 @@ unicode_expandtabs_impl(PyObject *self, int tabsize)
1125411254
}
1125511255

1125611256
/*[clinic input]
11257+
@text_signature "($self, sub[, start[, end]], /)"
1125711258
str.find as unicode_find = str.count
1125811259
1125911260
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
@@ -11265,7 +11266,7 @@ Return -1 on failure.
1126511266
static Py_ssize_t
1126611267
unicode_find_impl(PyObject *str, PyObject *substr, Py_ssize_t start,
1126711268
Py_ssize_t end)
11268-
/*[clinic end generated code: output=51dbe6255712e278 input=4a89d2d68ef57256]*/
11269+
/*[clinic end generated code: output=51dbe6255712e278 input=94138bf5531ee2c2]*/
1126911270
{
1127011271
Py_ssize_t result = any_find_slice(str, substr, start, end, 1);
1127111272
if (result < 0) {
@@ -11315,6 +11316,7 @@ unicode_hash(PyObject *self)
1131511316
}
1131611317

1131711318
/*[clinic input]
11319+
@text_signature "($self, sub[, start[, end]], /)"
1131811320
str.index as unicode_index = str.count
1131911321
1132011322
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].
@@ -11326,7 +11328,7 @@ Raises ValueError when the substring is not found.
1132611328
static Py_ssize_t
1132711329
unicode_index_impl(PyObject *str, PyObject *substr, Py_ssize_t start,
1132811330
Py_ssize_t end)
11329-
/*[clinic end generated code: output=77558288837cdf40 input=d986aeac0be14a1c]*/
11331+
/*[clinic end generated code: output=77558288837cdf40 input=5d36d2214563e75f]*/
1133011332
{
1133111333
Py_ssize_t result = any_find_slice(str, substr, start, end, 1);
1133211334
if (result == -1) {
@@ -12416,6 +12418,7 @@ unicode_repr(PyObject *unicode)
1241612418
}
1241712419

1241812420
/*[clinic input]
12421+
@text_signature "($self, sub[, start[, end]], /)"
1241912422
str.rfind as unicode_rfind = str.count
1242012423
1242112424
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
@@ -12427,7 +12430,7 @@ Return -1 on failure.
1242712430
static Py_ssize_t
1242812431
unicode_rfind_impl(PyObject *str, PyObject *substr, Py_ssize_t start,
1242912432
Py_ssize_t end)
12430-
/*[clinic end generated code: output=880b29f01dd014c8 input=898361fb71f59294]*/
12433+
/*[clinic end generated code: output=880b29f01dd014c8 input=6be966f58a917351]*/
1243112434
{
1243212435
Py_ssize_t result = any_find_slice(str, substr, start, end, -1);
1243312436
if (result < 0) {
@@ -12437,6 +12440,7 @@ unicode_rfind_impl(PyObject *str, PyObject *substr, Py_ssize_t start,
1243712440
}
1243812441

1243912442
/*[clinic input]
12443+
@text_signature "($self, sub[, start[, end]], /)"
1244012444
str.rindex as unicode_rindex = str.count
1244112445
1244212446
Return the highest index in S where substring sub is found, such that sub is contained within S[start:end].
@@ -12448,7 +12452,7 @@ Raises ValueError when the substring is not found.
1244812452
static Py_ssize_t
1244912453
unicode_rindex_impl(PyObject *str, PyObject *substr, Py_ssize_t start,
1245012454
Py_ssize_t end)
12451-
/*[clinic end generated code: output=5f3aef124c867fe1 input=35943dead6c1ea9d]*/
12455+
/*[clinic end generated code: output=5f3aef124c867fe1 input=a931a2e77feb5e47]*/
1245212456
{
1245312457
Py_ssize_t result = any_find_slice(str, substr, start, end, -1);
1245412458
if (result == -1) {

0 commit comments

Comments
 (0)
0