On 2007-06-06, Josiah Carlson <[EMAIL PROTECTED]> wrote:
> Neil Cerutti wrote:
>> On 2007-06-06, rhXX <[EMAIL PROTECTED]> wrote:
>>> and/or
>>>
>>> - SORTED - INSERT in the correct place using some criteria?
>> 
>> Consult the Python Docs about the heapq module.
>
> Heaps (as produced by heapq) are not sorted.  This will not
> produce correct results unless one then pops everything and
> de-dupes the output.

i agree that using bisect and inserting manually clearly meets
the stated requirements, while there isn't enough information to
know if a heapq will meet his requirements.

Thanks for the correction.

-- 
Neil Cerutti
In my prime I could have handled Michael Jordan.  Of course, he would be only
12 years old. --Jerry Sloan
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to