Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardPythondata model dunder dispatchSingle-choice MCQ

Why does defining only __eq__ on a class (with no __hash__) make its instances unhashable?

class A: def __eq__(self, other): return True hash(A()) # what happens?