Skip to content

Commit e7cce2a

Browse files
authored
Tweak wording for dataclasses.replace (gh-117758)
1 parent a74f117 commit e7cce2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/dataclasses.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,8 @@ Module contents
430430

431431
Creates a new object of the same type as ``obj``, replacing
432432
fields with values from ``changes``. If ``obj`` is not a Data
433-
Class, raises :exc:`TypeError`. If values in ``changes`` do not
434-
specify fields, raises :exc:`TypeError`.
433+
Class, raises :exc:`TypeError`. If keys in ``changes`` are not
434+
field names of the given dataclass, raises :exc:`TypeError`.
435435

436436
The newly returned object is created by calling the :meth:`~object.__init__`
437437
method of the dataclass. This ensures that

0 commit comments

Comments
 (0)