mirror of
https://github.com/python/cpython.git
synced 2025-08-21 01:15:03 +00:00
Fix str.rpartition(sep) when sep is not found in str.
Partially from SF patch #1551339, but also taken from head.
This commit is contained in:
parent
8dc71f2161
commit
29a5fdb7ca
6 changed files with 14 additions and 11 deletions
|
@ -1543,11 +1543,11 @@ string_partition(PyStringObject *self, PyObject *sep_obj)
|
|||
}
|
||||
|
||||
PyDoc_STRVAR(rpartition__doc__,
|
||||
"S.rpartition(sep) -> (head, sep, tail)\n\
|
||||
"S.rpartition(sep) -> (tail, sep, head)\n\
|
||||
\n\
|
||||
Searches for the separator sep in S, starting at the end of S, and returns\n\
|
||||
the part before it, the separator itself, and the part after it. If the\n\
|
||||
separator is not found, returns S and two empty strings.");
|
||||
separator is not found, returns two empty strings and S.");
|
||||
|
||||
static PyObject *
|
||||
string_rpartition(PyStringObject *self, PyObject *sep_obj)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue