alwayssortedlist (was Re: On PEP 322 (ireverse))
Alex Martelli
aleax at aleax.it
Fri Oct 31 03:49:18 EST 2003
Ian McMeans wrote:
> Not only is it not effective, but heaps don't keep their elements in
> sorted order... so if you wanted a list to stay sorted, heaps aren't
Please don't "top-post": somebody reading your reply can't see what
you ARE responding to. Putting your comments AFTER the phrase you're
commenting on is much kinder to readers.
I said a heap is "not effective" (as a way to sort, in Python) because
the sort method of lists is so much faster. You CAN use a heap to
sort, it's just not an _effective_ way to perform sorting in Python.
Alex
More information about the Python-list
mailing list