From 74ca30b758a4adb41ccdeaae40985edc09f7117e Mon Sep 17 00:00:00 2001 From: lazerg Date: Sun, 4 Oct 2026 19:34:38 +0500 Subject: [PATCH] gh-158798: Use "hashed collections" consistently in object.__hash__ docs --- Doc/reference/datamodel.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index c860a3356628af1..ce477bd23ea0b62 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -2257,10 +2257,10 @@ Basic customization If a class does not define an :meth:`__eq__` method it should not define a :meth:`__hash__` operation either; if it defines :meth:`__eq__` but not - :meth:`__hash__`, its instances will not be usable as items in hashable + :meth:`__hash__`, its instances will not be usable as items in hashed collections. If a class defines mutable objects and implements an :meth:`__eq__` method, it should not implement :meth:`__hash__`, since the - implementation of :term:`hashable` collections requires that a key's hash value is + implementation of hashed collections requires that a key's hash value is immutable (if the object's hash value changes, it will be in the wrong hash bucket).