[issue34696] PyByteArray_FromObject() has undocumented (and untested) behavior

Zackery Spytz report at bugs.python.org
Sat Sep 15 12:24:14 EDT 2018


New submission from Zackery Spytz <zspytz at gmail.com>:

The documentation states that PyByteArray_FromObject() creates a bytearray object from an object that implements the buffer protocol, but PyByteArray_FromObject() simply calls the bytearray constructor with its argument (the buffer protocol part is not enforced).

This was mentioned in #26759. Either the documentation or the behavior should be changed.

----------
messages: 325444
nosy: ZackerySpytz
priority: normal
severity: normal
status: open
title: PyByteArray_FromObject() has undocumented (and untested) behavior
type: behavior
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34696>
_______________________________________


More information about the Python-bugs-list mailing list