[Python-ideas] Implement comparison operators for range objects

Guido van Rossum guido at python.org
Fri Oct 14 22:43:23 CEST 2011


On Fri, Oct 14, 2011 at 1:10 PM, Ethan Furman <ethan at stoneleaf.us> wrote:
> A range is a sequence -- why should identical sequences not compare equal?

There's no such convention anywhere in Python. (1, 2) != [1, 2].
collections/abc.py does not define __eq__ for sequences.

Have you personally written code that compares ranges?

-- 
--Guido van Rossum (python.org/~guido)



More information about the Python-ideas mailing list