[EMAIL PROTECTED] wrote:
I'm frequently using Py2.4 sets, I find them quite useful, and I like
them, even if they seem a little slower than dicts.

They look exactly the same speed-wise to me:

>>> t1 = Timer('randrange(100) in foo', 'from random import randrange; foo = set(xrange(1000))')
>>> t2 = Timer('randrange(100) in foo', 'from random import randrange; foo = dict.fromkeys(xrange(1000))')
>>> t1.timeit()
3.0573790073394775
>>> t2.timeit()
3.064924955368042
>>> t2.timeit()
3.0590860843658447
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to