Closed
Description
API: PyObject* PyBytes_Join(PyObject *sep, PyObject *iterable)
Similar to sep.join(iterable)
in Python.
sep must be Python bytes
object.
iterable must be an iterable object yielding objects that implement the buffer protocol.
On success, return a new bytes
object. On error, set an exception and return NULL
.
- PR: gh-121645: Add PyBytes_Join() function python/cpython#121646
- Issue: [C API] Add PyBytes_Join() function python/cpython#121645
UPDATE: Don't accept sep=NULL.
It's different than PyUnicode_Join(NULL, iterable)
which treats NULL separator as a whitespace (' '
). This PyUnicode_Join()
behavior is not documented. The PyUnicode_Join()
documentation only says:
Join a sequence of strings using the given separator and return the resulting Unicode string.
Metadata
Metadata
Assignees
Labels
No labels