Skip to content
Closed
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
Fix typo in comments
Co-Authored-By: remilapeyre <remi.lapeyre@henki.fr>
  • Loading branch information
asvetlov and remilapeyre authored Dec 30, 2018
commit 86f42a18fcf223cdaad578d503b1b8e10c32cbdb
4 changes: 2 additions & 2 deletions Lib/dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ def _asdict_inner(obj, dict_factory):
return type(obj)(_asdict_inner(v, dict_factory) for v in obj)
elif isinstance(obj, collections.defaultdict):
# defaultdict does not have the same constructor than dict and must be
# hendled separately
# handled separately
return type(obj)(obj.default_factory, ((_asdict_inner(k, dict_factory),
_asdict_inner(v, dict_factory))
for k, v in obj.items()))
Expand Down Expand Up @@ -1138,7 +1138,7 @@ def _astuple_inner(obj, tuple_factory):
return type(obj)(_astuple_inner(v, tuple_factory) for v in obj)
elif isinstance(obj, collections.defaultdict):
# defaultdict does not have the same constructor than dict and must be
# hendled separately
# handled separately
return type(obj)(obj.default_factory, ((_asdict_inner(k, dict_factory),
_asdict_inner(v, dict_factory))
for k, v in obj.items()))
Expand Down