bpo-35540 dataclasses.asdict support defaultdict fields by kwsp · Pull Request #32056 · python/cpython
dataclasses.asdict breaks when there are `defaultdict`s in the dataclass attributes because it assumes `defaultdict` and `dict` are the same thing, but in reality `defaultdict` takes a default_factory as the first argument in its constructor. This change adds support for defaultdict fields.
wrmsr
mannequin
mentioned this pull request
This was referenced
This was referenced
kwsp
mentioned this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters