Simple - looking for a way to do an element exists check..

thebjorn BjornSteinarFjeldPettersen at gmail.com
Sat Feb 23 20:48:01 EST 2008


On Feb 24, 2:24 am, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
> thebjorn <BjornSteinarFjeldPetter... at gmail.com> writes:
> > If the lists are long enough to care, either rewrite use a set-based
> > solution if the items are hashable, or keep the elements sorted and
> > rewrite to use the bisect module if the elements can be ordered.
>
> Well, you want a tree data structure to have fast insertions to
> remember what items have already been seen.  There's been a bunch
> of proposals for an ordered dict type that works like this.
>
> Some day...

Amen!  .. *sigh*...



More information about the Python-list mailing list