@@ -256,13 +256,8 @@ the Python configuration.
256256
257257.. c:function:: int Py_UNICODE_ISPRINTABLE(Py_UCS4 ch)
258258
259- Return ``1`` or ``0`` depending on whether *ch* is a printable character.
260- Nonprintable characters are those characters defined in the Unicode character
261- database as "Other" or "Separator", excepting the ASCII space (0x20) which is
262- considered printable. (Note that printable characters in this context are
263- those which should not be escaped when :func: `repr ` is invoked on a string.
264- It has no bearing on the handling of strings written to :data: `sys.stdout ` or
265- :data: `sys.stderr `.)
259+ Return ``1`` or ``0`` depending on whether *ch* is a printable character,
260+ in the sense of :meth:`str.isprintable`.
266261
267262
268263These APIs can be used for fast direct character conversions:
@@ -1403,6 +1398,20 @@ They all return ``NULL`` or ``-1`` if an exception occurs.
14031398 separator. At most *maxsplit * splits will be done. If negative, no limit is
14041399 set. Separators are not included in the resulting list.
14051400
1401+ On error, return ``NULL `` with an exception set.
1402+
1403+ Equivalent to :py:meth: `str.split `.
1404+
1405+
1406+ .. c :function :: PyObject* PyUnicode_RSplit (PyObject *unicode, PyObject *sep, Py_ssize_t maxsplit)
1407+
1408+ Similar to :c:func: `PyUnicode_Split `, but splitting will be done beginning
1409+ at the end of the string.
1410+
1411+ On error, return ``NULL `` with an exception set.
1412+
1413+ Equivalent to :py:meth: `str.rsplit `.
1414+
14061415
14071416.. c :function :: PyObject* PyUnicode_Splitlines (PyObject *unicode, int keepends)
14081417
@@ -1411,6 +1420,33 @@ They all return ``NULL`` or ``-1`` if an exception occurs.
14111420 characters are not included in the resulting strings.
14121421
14131422
1423+ .. c :function :: PyObject* PyUnicode_Partition (PyObject *unicode, PyObject *sep)
1424+
1425+ Split a Unicode string at the first occurrence of *sep *, and return
1426+ a 3-tuple containing the part before the separator, the separator itself,
1427+ and the part after the separator. If the separator is not found,
1428+ return a 3-tuple containing the string itself, followed by two empty strings.
1429+
1430+ *sep * must not be empty.
1431+
1432+ On error, return ``NULL `` with an exception set.
1433+
1434+ Equivalent to :py:meth: `str.partition `.
1435+
1436+
1437+ .. c :function :: PyObject* PyUnicode_RPartition (PyObject *unicode, PyObject *sep)
1438+
1439+ Similar to :c:func: `PyUnicode_Partition `, but split a Unicode string at the
1440+ last occurrence of *sep *. If the separator is not found, return a 3-tuple
1441+ containing two empty strings, followed by the string itself.
1442+
1443+ *sep * must not be empty.
1444+
1445+ On error, return ``NULL `` with an exception set.
1446+
1447+ Equivalent to :py:meth: `str.rpartition `.
1448+
1449+
14141450.. c :function :: PyObject* PyUnicode_Join (PyObject *separator, PyObject *seq)
14151451
14161452 Join a sequence of strings using the given *separator * and return the resulting
0 commit comments