_siftup and _siftdown implementation

Sven R. Kunze srkunze at mail.de
Thu Feb 4 19:21:50 EST 2016

On 05.02.2016 01:12, Steven D'Aprano wrote:
> On Fri, 5 Feb 2016 07:50 am, srinivas devaki wrote:
>> _siftdown function breaks out of the loop when the current pos has a valid
>> parent.
>> but _siftup function is not implemented in that fashion, if a valid
>> subheap is given to the _siftup, it will bring down the root of sub heap
>> and then again bring it up to its original place.
>> I was wondering why it is so, is it just to make the code look simple???
> Hi Srinivas,
> I'm sure that your question is obvious to you, but it's not obvious to us.
> Where are _siftup and _siftdown defined? Are they in your code? Somebody
> else's code? A library? Which library? What do they do? Where are they
> from?

The question originated here: 

(btw, Steven, your email client somehow breaks my threading view in 
thunderbird. This reply appeared unconnected to Srinivas' post.)

More information about the Python-list mailing list