Marc 'BlackJack' Rintsch wrote: > On Mon, 30 Jul 2007 06:32:55 -0400, Steve Holden wrote: > >> >>> [x for x in xrange(0, 101)] == [y for y in xrange(101)] >> True > > First I thought: Why the unnecessary list comprehension but to my surprise: > > In [33]: xrange(42) == xrange(42) > Out[33]: False > > That's strange. > Not so strange really. The two xrange objects are different (though I confess I haven't looked to see how they implement comparisons), but iterating over them produces the same result.
regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://del.icio.us/steve.holden --------------- Asciimercial ------------------ Get on the web: Blog, lens and tag the Internet Many services currently offer free registration ----------- Thank You for Reading ------------- -- http://mail.python.org/mailman/listinfo/python-list