Skip to content
Prev Previous commit
Next Next commit
review comments
  • Loading branch information
eendebakpt committed Feb 23, 2026
commit 97cec2d5592af1e0eaf8a070bc7749f701533879
6 changes: 4 additions & 2 deletions Lib/dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,8 @@ class C:
If given, 'dict_factory' will be used instead of built-in dict.
The function applies recursively to field values that are
dataclass instances. This will also look into built-in containers:
tuples, lists, and dicts. Other objects are copied with 'copy.deepcopy()'.
tuples, lists, dicts, and frozendicts. Other objects are copied
with 'copy.deepcopy()'.
"""
if not _is_dataclass_instance(obj):
raise TypeError("asdict() should be called on dataclass instances")
Expand Down Expand Up @@ -1581,7 +1582,8 @@ class C:
If given, 'tuple_factory' will be used instead of built-in tuple.
The function applies recursively to field values that are
dataclass instances. This will also look into built-in containers:
tuples, lists, and dicts. Other objects are copied with 'copy.deepcopy()'.
tuples, lists, dicts, and frozendicts. Other objects are copied
with 'copy.deepcopy()'.
"""

if not _is_dataclass_instance(obj):
Expand Down
Loading