Issue #3751: str.rpartition would perform a left-partition when called with

a unicode argument.

will backport.
This commit is contained in:
Amaury Forgeot d'Arc 2008-09-01 19:52:00 +00:00
parent aa5f873980
commit 3571fbfed7
3 changed files with 9 additions and 1 deletions

View file

@ -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;