Skip to content

Commit

Permalink
fix: #478 _field_defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
mmckerns committed May 20, 2022
1 parent e76fa47 commit 5ee1206
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dill/_dill.py
Original file line number Diff line number Diff line change
Expand Up @@ -1788,7 +1788,7 @@ def save_type(pickler, obj, postproc_list=None):
if OLD37 or (not obj._field_defaults):
pickler.save_reduce(_create_namedtuple, (obj.__name__, obj._fields, obj.__module__), obj=obj)
else:
defaults = [obj._field_defaults[field] for field in obj._fields]
defaults = [obj._field_defaults[field] for field in obj._fields if field in obj._field_defaults]
pickler.save_reduce(_create_namedtuple, (obj.__name__, obj._fields, obj.__module__, defaults), obj=obj)
log.info("# T6")
return
Expand Down

0 comments on commit 5ee1206

Please sign in to comment.