DanielSank / observed

Observer pattern in python
MIT License
33 stars 4 forks source link

ObservableBoundMethod doesn't work in python3 #17

Closed DanielSank closed 5 years ago

DanielSank commented 7 years ago

I get

TypeError: unhashable type: ‘ObservableBoundMethod’

when using the decorator observable_method in Python 3. I do not receive the error when using python 2.

Adding

def __hash__(self):
    return id(self)

to ObservableBoundMethod fixes the problem.

DanielSank commented 5 years ago

This problem seems to be gone.