You're quite right, but if you don't implement __eq__, the hash of an object is simply a random integer (I suppose generated from the address of the object).
Alternatively, if you want a quick hash, you can use hash(str(obj)) (if you implemented __str__ or __repr__).
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/QDH4JUM547J6AGEEQ6XXM5RVLKAXC5JE/ Code of Conduct: http://python.org/psf/codeofconduct/
