.. _invalid-hash-returned: invalid-hash-returned / E0309 ============================= **Message emitted:** ``__hash__ does not return int`` **Description:** *Used when a __hash__ method returns something which is not an integer* **Problematic code:** .. literalinclude:: /data/messages/i/invalid-hash-returned/bad.py :language: python **Correct code:** .. literalinclude:: /data/messages/i/invalid-hash-returned/good.py :language: python Created by the `classes `__ checker.