On Fri, Feb 26, 2016 at 4:37 PM, Ian Kelly <ian.g.ke...@gmail.com> wrote:
> So I would guess that the difference here is because one
> implementation is entirely C, and the other implementation is entirely
> Python.

Exactly, the C implementation of siftup is only called internally. So
there's no need to export it as a function. Calling the C heappop
calls this internal siftup implementation, which uses the
_PyList_ITEMS macro to reference the list's internal ob_item array.
Thus all of the assignment operations party directly on the array
instead of using the abstract API.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to