Neil> On 2006-09-26, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
    >> bisect...

    Neil> That doesn't tell me if an item doesn't exist in the sequence
    Neil> though, does it?  Maybe I'm being dense.

    Neil> My guess nobody keeps their sequences sorted in Python. ;)

Sorry, I was on the phone as I replied, and was only typing with my left
hand, so my response was intentionally very brief. ;-)

If you use bisect to do your insertions, your lists remain sorted.  And as
for searching, all you have to do is look to the left or the right of the
insertion point (depending on which search method you call) to determine if
the item you're searching for is in the list.

Skip
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to