Am 12.10.2011 20:04, schrieb Alexander Belopolsky:
On Wed, Oct 12, 2011 at 1:58 PM, Mark Dickinson firstname.lastname@example.org wrote: ..
Should range(0, 10, 2) and range(0, 9, 2) be considered equal, or not?
I was going to ask the same question. I think ranges r1 and r2 should be considered equal iff list(r1) == list(r2). This is slightly harder to implement than just naively comparing (start, stop, step) tuples, but the advantage is that people won't run into surprises when they port 2.x code where result of range() is a list.