What happens to hashing when you define __eq__ without __hash__ in Python?
Correct answer
D. The class becomes unhashable
6 views
D. The class becomes unhashable
6 views
Defining __eq__ sets __hash__ to None unless you define it.
Asked in: Python Interview OOP
https://docs.python.org/3/tutorial/classes.htmlNot sure why the answer is D? Ask here and get an explanation.