[docs] [issue37110] Clarify hashability of custom class instances

Christoph Zwerschke report at bugs.python.org
Fri May 31 19:25:28 EDT 2019

Christoph Zwerschke <cito at online.de> added the comment:

My point was that it's not immediately obvious what "by default" means and that hashability is not only affected by the __hash__ method but also by __eq__.

But I agree, you can argue that "by default" already includes not adding any special methods like __eq__ and the glossary should not become too verbose. (I remember these words from Donald Knuth in one of his books: "In the interest of conciseness, you need to indulge in simplifications that are really little lies; these should be overlooked.")


Python tracker <report at bugs.python.org>

More information about the docs mailing list