[issue43905] dataclasses.astuple does deepcopy on all fields

Eric V. Smith report at bugs.python.org
Wed Apr 21 08:25:03 EDT 2021


Eric V. Smith <eric at trueblade.com> added the comment:

Unfortunately this can't be changed, although I suppose it should be documented.

In general I think this API was a mistake, and should not have been added. There are just too many cases where it doesn't do what you want, or where it fails.

I'd like to deprecate it and remove it (along with asdict), but I fear that would be too disruptive.

Your approach seems reasonable to me for your use case.

----------
assignee:  -> eric.smith
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43905>
_______________________________________


More information about the Python-bugs-list mailing list