◐ Shell
clean mode source ↗

gh-88071: Update docstrings of dataclass' astuple and asdict by ischurov · Pull Request #101806 · python/cpython

Updated docstrings of astuple and asdict to reflect that they deep copy objects in the field values, according to the changes in the docs (see #26154 and #88071).

I believe that this behaviour of astuple and asdict is rather counter-intuitive and it is important to inform the developer about it in the docstring. (I personally spent half an hour trying to fix a bug that appeared because I wasn't aware of it.)