diff options
author | Gouvernathor <44340603+Gouvernathor@users.noreply.github.com> | 2024-04-14 00:03:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-14 00:03:09 (GMT) |
commit | e7cce2a9c696250aff64a57b85182356367be041 (patch) | |
tree | 05f7932a58d7f3df425be63853eb0198e14d8c77 | |
parent | a74f117dab369e6c54156c7b2256769fed0c23d0 (diff) | |
download | cpython-e7cce2a9c696250aff64a57b85182356367be041.zip cpython-e7cce2a9c696250aff64a57b85182356367be041.tar.gz cpython-e7cce2a9c696250aff64a57b85182356367be041.tar.bz2 |
Tweak wording for dataclasses.replace (gh-117758)
-rw-r--r-- | Doc/library/dataclasses.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/dataclasses.rst b/Doc/library/dataclasses.rst index 61b2263..0b479f0 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 |