Re: Set builtin lookups

2007-06-29 Thread Alex Martelli
Steve Holden <[EMAIL PROTECTED]> wrote: > Marc 'BlackJack' Rintsch wrote: > > In <[EMAIL PROTECTED]>, Evan Klitzke > > wrote: > > > >> I have a question about the internal representation of sets in Python. > >> If I write some code like > >> > >> if x in some_list: > >> do_something() > >> >

Re: Set builtin lookups

2007-06-27 Thread Steve Holden
Marc 'BlackJack' Rintsch wrote: > In <[EMAIL PROTECTED]>, Evan Klitzke > wrote: > >> I have a question about the internal representation of sets in Python. >> If I write some code like >> >> if x in some_list: >> do_something() >> >> the lookup for the in statement is O(n), where n is the numb

Re: Set builtin lookups

2007-06-26 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Evan Klitzke wrote: > I have a question about the internal representation of sets in Python. > If I write some code like > > if x in some_list: > do_something() > > the lookup for the in statement is O(n), where n is the number of > elements in the list. Is this also