[issue34409] Add a way to customize iteration over fields in asdict() for the nested dataclasses
Eric V. Smith
report at bugs.python.org
Wed Sep 12 14:28:08 EDT 2018
Eric V. Smith <eric at trueblade.com> added the comment:
Thanks, Raymond. I agree that this request is too specialized to add to dataclasses. Any proposal here or that I've been able to think of complicate the API for the much more common use case of not needing asdict() specialization.
To the original poster: I suggest you just implement the functionality you need in a custom version of asdict() yourself. As noted, all of the information needed for a custom asdict() are publicly available.
----------
resolution: -> rejected
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34409>
_______________________________________
More information about the Python-bugs-list
mailing list