abcdef <x...@mailinator.com> added the comment:

>  Perhaps heappop could say that the heap invariant is maintained if the heap 
> is properly sorted before the heappop invocation.

Honestly I like this wording less. "Properly sorted" would suggest sorted in 
the sense of heap.sort() [as the docs refer to this earlier], but the array 
doesn't have to be sorted; it's enough if it's a heap. The function always 
maintains the invariant - this means that if the invariant is true as a 
precondition, it will be true as a postcondition. Maybe you have a different 
idea?

----------
nosy: +abcdef

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32142>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to