item access time: sets v. lists

Paul McGuire ptmcg at austin.rr._bogus_.com
Wed Oct 4 13:54:07 EDT 2006


"Neil Cerutti" <horpner at yahoo.com> wrote in message 
news:slrnei7sc2.fs.horpner at FIAD06.norwich.edu...

> Look at the code again. It's not testing what it says it's
> testing.
>

It isnt?

The only quibble I can see is that there really is no "first" element in a 
set.  I picked the "0 in set" and "0 in list" to pick the fastest case for 
list, which does a linear search through the list elements.

Where did I go wrong on the test descriptions?

-- Paul





More information about the Python-list mailing list