mirror of
https://github.com/python/cpython.git
synced 2025-09-15 13:16:12 +00:00
Issue #3751: str.rpartition would perform a left-partition when called with
a unicode argument. will backport.
This commit is contained in:
parent
aa5f873980
commit
3571fbfed7
3 changed files with 9 additions and 1 deletions
|
@ -1638,7 +1638,7 @@ string_rpartition(PyStringObject *self, PyObject *sep_obj)
|
|||
}
|
||||
#ifdef Py_USING_UNICODE
|
||||
else if (PyUnicode_Check(sep_obj))
|
||||
return PyUnicode_Partition((PyObject *) self, sep_obj);
|
||||
return PyUnicode_RPartition((PyObject *) self, sep_obj);
|
||||
#endif
|
||||
else if (PyObject_AsCharBuffer(sep_obj, &sep, &sep_len))
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue