Skip to content

Files

Latest commit

 

History

History
7 lines (4 loc) · 314 Bytes

eq-without-hash.md

File metadata and controls

7 lines (4 loc) · 314 Bytes

Pattern: Use of __eq__ without __hash__

Issue: -

Description

Used when a class implements __eq__ but not __hash__. In Python 2, objects get object.__hash__ as the default implementation, in Python 3 objects get None as their default __hash__ implementation if they also implement __eq__.