https://github.com/python/cpython/commit/4a30154fd27f055a97d6543a2cbf71f578b7eed5
commit: 4a30154fd27f055a97d6543a2cbf71f578b7eed5
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: ericvsmith <[email protected]>
date: 2025-06-12T01:36:17Z
summary:

[3.14] Fix presentation of dataclasses' `unsafe_hash` default value (GH-116532) 
(#135416)

Fix presentation of dataclasses' `unsafe_hash` default value (GH-116532)

(cherry picked from commit 71f5fafdfb2e509f59cd584d45949c6496f88d41)

Co-authored-by: Victorien <[email protected]>
Co-authored-by: Adam Turner <[email protected]>

files:
M Doc/library/dataclasses.rst

diff --git a/Doc/library/dataclasses.rst b/Doc/library/dataclasses.rst
index f18c7cc9c02da6..299c8aa399c25c 100644
--- a/Doc/library/dataclasses.rst
+++ b/Doc/library/dataclasses.rst
@@ -121,8 +121,11 @@ Module contents
      :meth:`!__le__`, :meth:`!__gt__`, or :meth:`!__ge__`, then
      :exc:`TypeError` is raised.
 
-   - *unsafe_hash*: If ``False`` (the default), a :meth:`~object.__hash__` 
method
-     is generated according to how *eq* and *frozen* are set.
+   - *unsafe_hash*: If true, force ``dataclasses`` to create a
+     :meth:`~object.__hash__` method, even though it may not be safe to do so.
+     Otherwise, generate a :meth:`~object.__hash__` method according to how
+     *eq* and *frozen* are set.
+     The default value is ``False``.
 
      :meth:`!__hash__` is used by built-in :meth:`hash`, and when objects are
      added to hashed collections such as dictionaries and sets.  Having a

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to