https://github.com/python/cpython/commit/9a10b734f164ca5a253ae3a05f4960e3fcbeef2b
commit: 9a10b734f164ca5a253ae3a05f4960e3fcbeef2b
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: ericvsmith <[email protected]>
date: 2025-06-12T01:37:30Z
summary:

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

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 47b2d559989696..432c2b0d7bc000 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