preferring [] or () in list of error codes?

samwyse samwyse at
Tue Jun 9 11:20:04 EDT 2009

On Jun 9, 12:30 am, Emile van Sebille <em... at> wrote:
> On 6/8/2009 8:43 PM Ben Finney said...

> > The fact that literal set syntax is a relative newcomer is the primary
> > reason for that, I'd wager.
> Well, no.  It really is more, "that's odd... why use set?"

Until I ran some timing tests this morning, I'd have said that sets
could determine membership faster than a list, but that's apparently
not true, assuming that the list has less than 8K members.  Above 16K
members, sets are much faster than lists.  I'm not sure where the
break is, or even why there's a break.

More information about the Python-list mailing list