On Thu, Dec 31, 2020 at 11:51 AM Eric V. Smith <eric@trueblade.com> 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?
I'm not opposed to it. Since I can't make asdict/astuple go away, I might as well make them more useful.
Eric