Make NOTHING's hash vegan (#332)
...and fit into a 32bit integer. Fixes #331
This commit is contained in:
parent
75cdf8fe91
commit
825de4f008
|
@ -0,0 +1 @@
|
||||||
|
The hash of ``attr.NOTHING`` is now vegan and faster on 32bit Python builds.
|
|
@ -0,0 +1 @@
|
||||||
|
The hash of ``attr.NOTHING`` is now vegan and faster on 32bit Python builds.
|
|
@ -45,7 +45,7 @@ class _Nothing(object):
|
||||||
return "NOTHING"
|
return "NOTHING"
|
||||||
|
|
||||||
def __hash__(self):
|
def __hash__(self):
|
||||||
return 0xdeadbeef
|
return 0xc0ffee
|
||||||
|
|
||||||
|
|
||||||
NOTHING = _Nothing()
|
NOTHING = _Nothing()
|
||||||
|
|
Loading…
Reference in New Issue