[issue29159] Regression in bytes constructor
Alexander Belopolsky
report at bugs.python.org
Wed Jan 4 15:12:51 EST 2017
Alexander Belopolsky added the comment:
My test code may seem contrived, but numpy arrays exhibit similar behavior:
>>> a = numpy.array([2, 2])
>>> bytes(a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: only integer arrays with one element can be converted to an index
Under python 3.5, the result was
>>> bytes(a)
b'\x02\x00\x00\x00\x02\x00\x00\x00'
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29159>
_______________________________________
More information about the Python-bugs-list
mailing list