Tweak wording for dataclasses.replace (gh-117758)

This commit is contained in:
Gouvernathor 2024-04-14 02:03:09 +02:00 committed by GitHub
parent a74f117dab
commit e7cce2a9c6
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