Dan Bishop: > xrange already has __contains__. The problem is, it's implemented by a > highly-inefficient sequential search. Why not modify it to merely > check the bounds and (value - start) % step == 0?
I think this is a nice idea. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list