forbiddenfruit
forbiddenfruit copied to clipboard
Added support for __hash__
Tiny change to override_dict to allow overriding __hash__(self) magic method
Can be verified by running following code:
import forbiddenfruit
hashLambda = lambda obj: id(obj)
forbiddenfruit.curse(set, "__hash__", hashLambda)
baseSet = {"a", "b"}
outerSet = {baseSet, 24} # set now contains another set object, using its id in memory as its hash