[issue15958] bytes.join() should allow arbitrary buffer objects

Antoine Pitrou report at bugs.python.org
Sat Sep 22 12:31:10 CEST 2012


Antoine Pitrou added the comment:

> Attached new refleakless patch.

Your approach is dangerous, because the buffers may change size between
two calls to PyObject_GetBuffer(). I think you should keep the
Py_buffers alive in an array, and only release them at the end (it may
also be slightly faster to do so).

A nit: you are adding a lot of newlines in test_bytes.py.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15958>
_______________________________________


More information about the Python-bugs-list mailing list