[Python-Dev] cpython: Issue #22003: When initialized from a bytes object, io.BytesIO() now (original) (raw)

dw+python-dev at python.org dw+python-dev at python.org
Wed Jul 30 11:46:30 CEST 2014


Hi Serhiy,

At least conceptually, 15381 seems the better approach, but getting a correct implementation may take more iterations than the (IMHO) simpler change in 22003. For my tastes, the current 15381 implementation seems a little too magical in relying on Py_REFCNT() as the sole indication that a PyBytes can be mutated.

For the sake of haste, 22003 only addresses the specific regression introduced in Python 3.x BytesIO, compared to 2.x StringI, where 3.x lacked an equivalent no-copies specialization.

David



More information about the Python-Dev mailing list