Skip to content

Commit b0f1da5

Browse files
Update str.replace docstring too
1 parent e80a841 commit b0f1da5

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

Objects/clinic/unicodeobject.c.h

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

Objects/unicodeobject.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12561,7 +12561,6 @@ PyUnicode_Replace(PyObject *str,
1256112561
}
1256212562

1256312563
/*[clinic input]
12564-
@permit_long_docstring_body
1256512564
str.replace as unicode_replace
1256612565
1256712566
old: unicode
@@ -12573,14 +12572,14 @@ str.replace as unicode_replace
1257312572
1257412573
Return a copy with all occurrences of substring old replaced by new.
1257512574
12576-
If the optional argument count is given, only the first count occurrences are
12577-
replaced.
12575+
If count is given, only the first count occurrences are replaced.
12576+
If count is not specified or -1, then all occurrences are replaced.
1257812577
[clinic start generated code]*/
1257912578

1258012579
static PyObject *
1258112580
unicode_replace_impl(PyObject *self, PyObject *old, PyObject *new,
1258212581
Py_ssize_t count)
12583-
/*[clinic end generated code: output=b63f1a8b5eebf448 input=f27ca92ac46b65a1]*/
12582+
/*[clinic end generated code: output=b63f1a8b5eebf448 input=92ae6270a91fd5da]*/
1258412583
{
1258512584
return replace(self, old, new, count);
1258612585
}

0 commit comments

Comments
 (0)