This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author josh.r
Recipients Saimadhav.Heblikar, ezio.melotti, josh.r, wchlm
Date 2014-04-09.21:33:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1397079222.99.0.665884830367.issue21185@psf.upfronthosting.co.za>
In-reply-to
Content
It's not really relevant what a heapified list looks like (and there is no reason to guarantee a particular appearance, since it's an implementation detail that could change). It's supposed to function as a heap with the heap functions, that's all. The docs do give a guarantee that a sorted list is already "heapified", but that's a one way guarantee: All sorted lists are heaps, but not all heaps are sorted lists.

The docs also mention the big-O behavior of heapify; it's linear time, O(n), while good general purpose sorting algorithms are O(n log n). A linear algorithm cannot sort a general list.
History
Date User Action Args
2014-04-09 21:33:43josh.rsetrecipients: + josh.r, ezio.melotti, wchlm, Saimadhav.Heblikar
2014-04-09 21:33:42josh.rsetmessageid: <1397079222.99.0.665884830367.issue21185@psf.upfronthosting.co.za>
2014-04-09 21:33:42josh.rlinkissue21185 messages
2014-04-09 21:33:42josh.rcreate