Olive wrote:
> I am trying to define a class whose instances should not be hashable,
> following:
> http://docs.python.org/2/reference/datamodel.html#object.__hash__
>
> class A:
> def __init__(self,a):
> self.value=a
> __hash__=None
>
>
> Then:
>
a=A(3)
hash(a)
>
On Wed, Feb 20, 2013 at 12:38 AM, Olive
wrote:
> I am trying to define a class whose instances should not be hashable,
> following: http://docs.python.org/2/reference/datamodel.html#object.__hash__
>
> class A:
> def __init__(self,a):
> self.value=a
> __hash__=None
This is an old
- Original Message -
> I am trying to define a class whose instances should not be hashable,
> following:
> http://docs.python.org/2/reference/datamodel.html#object.__hash__
>
> class A:
> def __init__(self,a):
> self.value=a
> __hash__=None
>
>
> Then:
>
> >>> a=A(3
I am trying to define a class whose instances should not be hashable,
following: http://docs.python.org/2/reference/datamodel.html#object.__hash__
class A:
def __init__(self,a):
self.value=a
__hash__=None
Then:
>>> a=A(3)
>>> hash(a)
Traceback (most recent call last):
Fil