[Python-ideas] Implement comparison operators for range objects

MRAB python at mrabarnett.plus.com
Thu Oct 13 04:05:59 CEST 2011


On 13/10/2011 02:43, Nick Coghlan wrote:
> On Thu, Oct 13, 2011 at 11:06 AM, Guido van Rossum<guido at python.org>  wrote:
>> Yeah, we're down to bikeshedding about whether range(0, 10, 2) ==
>> range(0, 11, 2).
>
> I'll weigh in on the "compare like a sequence" side, even if the
> specific range definitions are different. It's the way range
> comparisons work in Python 2 and I'd like range() objects to be as
> close to a computationally defined immutable list as we can get them.
> It may even make sense to make them hashable in those terms.
>
+1



More information about the Python-ideas mailing list