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

(cherry picked from commit e7cce2a9c6)

Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2024-04-14 18:52:44 +02:00 committed by GitHub
parent 0c0b2309fb
commit 1bf2d4be7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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