Ian Kelly wrote:
On Thu, Oct 20, 2011 at 12:00 PM, Hans Mulder <han...@xs4all.nl> wrote:
There's already a discussion about this on python-ideas. But somebody
please tell me, why would you ever need to compare ranges?
It could be useful if you're unit-testing a function that returns a range.
Easy:
list(range1) == list(range2)
The biggest reason in my mind for implementing range equality is that
currently two ranges compare equal iff they are the same range. In
other words:
--> range(10) == range(10)
False
~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list