mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-16 04:23:41 +02:00
feat: truncate hash to 32bit to deal with automatic truncation of python
dunder hash method.
This commit is contained in:
parent
ded21e792f
commit
572309c800
1 changed files with 1 additions and 1 deletions
|
@ -692,7 +692,7 @@ class Obs:
|
||||||
hash_tuple += tuple([o.encode() for o in self.names])
|
hash_tuple += tuple([o.encode() for o in self.names])
|
||||||
m = hashlib.md5()
|
m = hashlib.md5()
|
||||||
[m.update(o) for o in hash_tuple]
|
[m.update(o) for o in hash_tuple]
|
||||||
return int(m.hexdigest(), 16)
|
return int(m.hexdigest(), 16) & 0xFFFFFFFF
|
||||||
|
|
||||||
# Overload comparisons
|
# Overload comparisons
|
||||||
def __lt__(self, other):
|
def __lt__(self, other):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue