https://github.com/python/cpython/commit/1bf2d4be7e779eba76f6edfde09509355f34af28
commit: 1bf2d4be7e779eba76f6edfde09509355f34af28
branch: 3.12
author: Miss Islington (bot) <[email protected]>
committer: erlend-aasland <[email protected]>
date: 2024-04-14T16:52:44Z
summary:

[3.12] Tweak wording for dataclasses.replace (gh-117758) (#117876)

(cherry picked from commit e7cce2a9c696250aff64a57b85182356367be041)

Co-authored-by: Gouvernathor <[email protected]>

files:
M Doc/library/dataclasses.rst

diff --git a/Doc/library/dataclasses.rst b/Doc/library/dataclasses.rst
index 95b746d81dfde6..d62011cee1b111 100644
--- a/Doc/library/dataclasses.rst
+++ b/Doc/library/dataclasses.rst
@@ -430,8 +430,8 @@ Module contents
 
    Creates a new object of the same type as ``obj``, replacing
    fields with values from ``changes``.  If ``obj`` is not a Data
-   Class, raises :exc:`TypeError`.  If values in ``changes`` do not
-   specify fields, raises :exc:`TypeError`.
+   Class, raises :exc:`TypeError`.  If keys in ``changes`` are not
+   field names of the given dataclass, raises :exc:`TypeError`.
 
    The newly returned object is created by calling the :meth:`~object.__init__`
    method of the dataclass.  This ensures that

_______________________________________________
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