On Thu, Dec 31, 2020 at 11:51 AM Eric V. Smith <[email protected]> wrote:
> I'd suggest you just write your own function to do this. I consider > adding dataclasses.asdict and .astuple to be mistakes. > I agree there -- if you want something that can be used like this -- use a dict in the first place :-) Eric: what do you think about adding a "shallow" (or "deep") flag to dataclasses.asdict() that would then upack only the top-level dataclass? -CHB -- Christopher Barker, PhD (Chris) Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web Development - wxPython, numpy, scipy, Cython
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/XRSIQIMZAIO3T3CWN2WQI3QL3TB6AY6H/ Code of Conduct: http://python.org/psf/codeofconduct/
