preferring [] or () in list of error codes?
Carl Banks
pavlovevidence at gmail.com
Tue Jun 9 12:21:25 EDT 2009
On Jun 9, 8:20 am, samwyse <samw... at gmail.com> wrote:
> On Jun 9, 12:30 am, Emile van Sebille <em... at fenx.com> 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,
See my reply to that post. I believe your tests were flawed.
> 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.
The break comes from the compiler, not the objects themselves.
Carl Banks
More information about the Python-list
mailing list