diff options
Diffstat (limited to 'pyasn1/type/base.py')
-rw-r--r-- | pyasn1/type/base.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pyasn1/type/base.py b/pyasn1/type/base.py index 155ed74..72920a9 100644 --- a/pyasn1/type/base.py +++ b/pyasn1/type/base.py @@ -99,7 +99,8 @@ class AbstractSimpleAsn1Item(Asn1ItemBase): def __nonzero__(self): return bool(self._value) else: def __bool__(self): return bool(self._value) - def __hash__(self): return self.__hashedValue + def __hash__(self): + return self.__hashedValue is noValue and hash(noValue) or self.__hashedValue def hasValue(self): return not isinstance(self._value, NoValue) |