kkto at csis.hku.hk
Fri Sep 6 15:22:57 CEST 2002
>>>>> "Raymond" == Raymond Hettinger <python at rcn.com> writes:
Raymond> Hello Issac, Try looking at seqdict in the Vaults of Parnassus:
Ah... after I read this it makes sense again now, since Python map is not
comparison based. Perhaps I've got the wrong idea from the beginning...
Raymond> Your other ideas were good too. The auxilliary map of
Raymond> successors and precessors is likely to be the fastest. To
Raymond> efficiently update a sorted python list, try the bisect module.
But difficult to code. I've to maintain 3 data structures instead of 1.
Well... perhaps time to write a class. =)
More information about the Python-list