[Python-ideas] Implement comparison operators for range objects
alex23
wuwei23 at gmail.com
Mon Oct 17 05:51:04 CEST 2011
On Oct 16, 3:04 am, Alexander Belopolsky
<alexander.belopol... at gmail.com> wrote:
> On Sat, Oct 15, 2011 at 12:47 PM, Guido van Rossum <gu... at 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.
Could someone point me to an explanation as to why this is the case?
Was it purely to avoid confusion?
I could easily see myself trying to use slices as keys in a dictionary
dispatch.
More information about the Python-ideas
mailing list