> But you've just pointed out that they're *not*
> the same kind of concept, no matter how much
> you might wish that there were.
> The only way to make hashability testable at
> less cost than attempting to do it would be
> to have a separate __is_hashable__ method for
> that purpose, which would
On 7/23/06, Andrew Koenig <[EMAIL PROTECTED]> wrote:
> > But you've just pointed out that they're *not*
> > the same kind of concept, no matter how much
> > you might wish that there were.
>
> > The only way to make hashability testable at
> > less cost than attempting to do it would be
> > to have
Guido van Rossum wrote:
> I propose to take the same approach as for callable: if it has
> __hash__ we consider it hashable even though the hash may fail
Fair enough, although since object has __hash__
we end up concluding that everything is
hashable except when it isn't. :-)
--
Greg