John Machin wrote: > On 18/07/2006 12:41 PM, [EMAIL PROTECTED] wrote: > > it seems that range() can be really slow:
[...] > Some things to try: > 1a. Read what the manual has to say about the range() function ... what > does it produce? Indeed. Still, the addition of a __contains__ method to range (and xrange) would permit acceptable performance for the code given. Perhaps this is a convenience worth considering for future Python releases. Paul -- http://mail.python.org/mailman/listinfo/python-list