[Python-ideas] Implement comparison operators for range objects

Bruce Leban bruce at leapyear.org
Wed Oct 12 20:30:17 CEST 2011


On Wed, Oct 12, 2011 at 9:31 AM, Sven Marnach <sven at marnach.net> wrote:

> There are circumstances, for example in unit testing, when it might be
> useful to check if two range objects describe the same range.


Other than unit testing, what are the use cases? If I was writing a unit
test, I'd be inclined to be very explicit about what I meant

r1 is r2
repr(r1) == repr(r2)
list(r1) == list(r2)

Absent another use case,
-1

--- Bruce
w00t! Gruyere security codelab graduated from Google Labs!
http://j.mp/googlelabs-gruyere
Not to late to give it a 5-star rating if you like it. :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20111012/d6d23eb8/attachment.html>


More information about the Python-ideas mailing list