Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update str.replace docstring too
  • Loading branch information
StanFromIreland committed Mar 31, 2026
commit b0f1da59168faec2e7ec23b0d9d0476413ee7fad
6 changes: 3 additions & 3 deletions Objects/clinic/unicodeobject.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -12561,7 +12561,6 @@ PyUnicode_Replace(PyObject *str,
}

/*[clinic input]
@permit_long_docstring_body
str.replace as unicode_replace

old: unicode
Expand All @@ -12573,14 +12572,14 @@ str.replace as unicode_replace

Return a copy with all occurrences of substring old replaced by new.

If the optional argument count is given, only the first count occurrences are
replaced.
If count is given, only the first count occurrences are replaced.
If count is not specified or -1, then all occurrences are replaced.
[clinic start generated code]*/

static PyObject *
unicode_replace_impl(PyObject *self, PyObject *old, PyObject *new,
Py_ssize_t count)
/*[clinic end generated code: output=b63f1a8b5eebf448 input=f27ca92ac46b65a1]*/
/*[clinic end generated code: output=b63f1a8b5eebf448 input=92ae6270a91fd5da]*/
{
return replace(self, old, new, count);
}
Expand Down
Loading