[issue33593] Support heapq on typed arrays?
Serhiy Storchaka
report at bugs.python.org
Tue May 22 14:06:28 EDT 2018
Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:
Workaround:
alist = list(a)
heapq.heapify(alist)
a[:] = alist
And it should be not much slower than using heapq.heapify() directly if it could support general sequences. Using it with array.array would add significant overhead due to boxing.
----------
nosy: +serhiy.storchaka
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33593>
_______________________________________
More information about the Python-bugs-list
mailing list