Issue #3751: str.rpartition would perform a left-partition when called with
a unicode argument.
Backport of r66119
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 60d3e8a..8588343 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -1595,7 +1595,7 @@
}
#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;