8000 Address Petr's review · python/cpython@b43ce9e · GitHub
[go: up one dir, main page]

Skip to content

Commit b43ce9e

Browse files
committed
Address Petr's review
1 parent b13e31c commit b43ce9e

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

Doc/c-api/bytes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ called with a non-bytes parameter.
195195
196196
*sep* must be Python :class:`bytes` object, or ``NULL`` which is treated as
197197
an empty bytes string.
198+
(Note that the *sep* default is different from :c:func:`PyUnicode_Join`.)
198199
199200
*iterable* must be an iterable object yielding objects that implement the
200201
:ref:`buffer protocol <bufferobjects>`.

Doc/whatsnew/3.14.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ New Features
357357

358358
(Contributed by Victor Stinner in :gh:`119182`.)
359359

360-
* Add :c:func:`PyBytes_Join(seq, iterable) <PyBytes_Join>` function,
360+
* Add :c:func:`PyBytes_Join(sep, iterable) <PyBytes_Join>` function,
361361
similar to ``sep.join(iterable)`` in Python.
362362
(Contributed by Victor Stinner in :gh:`121645`.)
363363

Lib/test/test_capi/test_bytes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,9 @@ def test_join(self):
266266

267267
# invalid 'sep' argument type
268268
with self.assertRaises(TypeError):
269-
bytes_join(bytearray('sep'), [])
269+
bytes_join(bytearray(b'sep'), [])
270+
with self.assertRaises(TypeError):
271+
bytes_join(memoryview(b'sep'), [])
270272
with self.assertRaises(TypeError):
271273
bytes_join('', []) # empty Unicode string
272274
with self.assertRaises(TypeError):
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Add :c:func:`PyBytes_Join(seq, iterable) <PyBytes_Join>` function, similar to
1+
Add :c:func:`PyBytes_Join(sep, iterable) <PyBytes_Join>` function, similar to
22
``sep.join(iterable)`` in Python. Patch by Victor Stinner.

0 commit comments

Comments
 (0)
0