Make NOTHING's hash vegan (#332)

...and fit into a 32bit integer.

Fixes #331
This commit is contained in:
Hynek Schlawack 2018-01-26 14:30:23 +01:00 committed by Tin Tvrtković
parent 75cdf8fe91
commit 825de4f008
3 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1 @@
The hash of ``attr.NOTHING`` is now vegan and faster on 32bit Python builds.

View File

@ -0,0 +1 @@
The hash of ``attr.NOTHING`` is now vegan and faster on 32bit Python builds.

View File

@ -45,7 +45,7 @@ class _Nothing(object):
return "NOTHING"
def __hash__(self):
return 0xdeadbeef
return 0xc0ffee
NOTHING = _Nothing()