From e7cce2a9c696250aff64a57b85182356367be041 Mon Sep 17 00:00:00 2001 From: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com> Date: Sun, 14 Apr 2024 02:03:09 +0200 Subject: Tweak wording for dataclasses.replace (gh-117758) --- Doc/library/dataclasses.rst | 4 ++-- 1 file 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 -- cgit v0.12