]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Tweak wording for dataclasses.replace (gh-117758)
authorGouvernathor <44340603+Gouvernathor@users.noreply.github.com>
Sun, 14 Apr 2024 00:03:09 +0000 (02:03 +0200)
committerGitHub <noreply@github.com>
Sun, 14 Apr 2024 00:03:09 +0000 (20:03 -0400)
Doc/library/dataclasses.rst

index 61b2263339da714ef7a85bc3037f496c08a8b305..0b479f0d569981ef851983b24f238af2f620e25c 100644 (file)
@@ -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