[Python-ideas] Implement comparison operators for range objects
Guido van Rossum
guido at python.org
Fri Oct 14 19:23:10 CEST 2011
We've been bikeshedding long enough. I propose to do the following to
range() in Python 3.3:
- add read-only attributes .start, .step, .stop
- add slicing such that it normalizes .stop to .start + the right
multiple of .step
- add __eq__ and __hash__ which compare by .start, .step, .stop
And no more.
--
--Guido van Rossum (python.org/~guido)
More information about the Python-ideas
mailing list