d = {}; d[0:1] = 1; d[0:1] = 2; print d[0:1]

Alex Martelli aleaxit at yahoo.com
Thu Mar 1 09:09:56 EST 2001


"Konrad Hinsen" <hinsen at cnrs-orleans.fr> wrote in message
news:m3ae75rfl6.fsf at chinon.cnrs-orleans.fr...
> Robin Thomas <robin.thomas at starmedia.net> writes:
>
> > The question remains: should slice objects be hashable/comparable so
that
> >
> >  >>> slice(0,1) == slice(0,1)
> > 1
> >
> > I say YES YES YES. What do you say?
>
> Another YES YES YES. That's what anyone would expect in my opinion.

It definitely is what _I_ would expect, although, as a sample,
I guess I'm slightly skimpy.  What purpose is satisfied by
having this == test return 0...?


Alex






More information about the Python-list mailing list