Skip to content

Commit 83d332b

Browse files
committed
Update the description of the TypeError exception regarding freezing instances
1 parent ee4030c commit 83d332b

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
@@ -164,8 +164,8 @@ Module contents
164164
generate an exception. This emulates read-only frozen instances.
165165
See the :ref:`discussion <dataclasses-frozen>` below.
166166

167-
If :meth:`~object.__setattr__` or :meth:`~object.__delattr__` is defined in the class,
168-
then :exc:`TypeError` is raised.
167+
If :meth:`~object.__setattr__` or :meth:`~object.__delattr__` is defined in the class
168+
and *frozen* is true, then :exc:`TypeError` is raised.
169169

170170
- *match_args*: If true (the default is ``True``), the
171171
:attr:`~object.__match_args__` tuple will be created from the list of

0 commit comments

Comments
 (0)