[issue43905] dataclasses.astuple does deepcopy on all fields
Eric V. Smith
report at bugs.python.org
Wed Apr 21 09:20:47 EDT 2021
Eric V. Smith <eric at trueblade.com> added the comment:
The reason for the deep copying was to support changing a hierarchy of dataclasses into something that could be JSON serialized. But it didn't really work out. It recurses into dataclasses, namedtuples, lists, tuples, and dicts, and deep copies everything else.
As I said, it's a design flaw.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43905>
_______________________________________
More information about the Python-bugs-list
mailing list