On Sat, Oct 15, 2011 at 12:47 PM, Guido van Rossum <guido@python.org> wrote: ..
I remember in the past thinking about unifying slice() and range() and I couldn't do it. I still can't. I think they should remain separate.
One of the issues with slices is that they are deliberately made unhashable to prevent slicing of dictionaries. I am not sure range() objects need to be hashable. To me they are more like *lists* of equally spaced integers rather than *tuples*. (My reasons are not strong, but FWIW they are: (1) tuples are usually containers of heterogeneous objects and regular sequences are lists; and (2) 2.x range() (not xrange()) returns a list rather than a tuple.) On the other hand, making range() objects hashable will put an end to requests for writable .start, .stop, .step.