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 -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/QDH4JUM547J6AGEEQ6XXM5RVLKAXC5JE/ Code of Conduct: http://python.org/psf/codeofconduct/