Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
removed links to the bugs
  • Loading branch information
kwsp committed Oct 11, 2022
commit 8aa1b3dff4865535d9b4bbefe5a6f6c02425536a
2 changes: 0 additions & 2 deletions Lib/dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,6 @@ def _asdict_inner(obj, dict_factory):
if hasattr(type(obj), 'default_factory'):
Comment thread
carljm marked this conversation as resolved.
# obj is a defaultdict, which has a different constructor from
# dict as it requires the default_factory as its first arg.
# https://bugs.python.org/issue35540
result = type(obj)(getattr(obj, 'default_factory'))
for k, v in obj.items():
result[_asdict_inner(k, dict_factory)] = _asdict_inner(v, dict_factory)
Expand Down Expand Up @@ -1389,7 +1388,6 @@ def _astuple_inner(obj, tuple_factory):
if hasattr(type(obj), 'default_factory'):
# obj is a defaultdict, which has a different constructor from
# dict as it requires the default_factory as its first arg.
# https://bugs.python.org/issue35540
result = type(obj)(getattr(obj, 'default_factory'))
for k, v in obj.items():
result[_astuple_inner(k, tuple_factory)] = _asdict_inner(v, tuple_factory)
Comment thread
kwsp marked this conversation as resolved.
Outdated
Expand Down