[issue39929] dataclasses.asdict will mangle collection.Counter instances

2020-03-11 Thread Eric V. Smith
Eric V. Smith added the comment: The asdict API was a mistake, because it's not possible for it to know how to create all possible sub-objects. I can't decide what to do about it. I might just "abandon it in place", by documenting its problems and suggesting it not be used. I should

[issue39929] dataclasses.asdict will mangle collection.Counter instances

2020-03-11 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39929] dataclasses.asdict will mangle collection.Counter instances

2020-03-11 Thread bscarlett
New submission from bscarlett : I noticed that dataclasses.asdict seems to incorrectly reconstruct collections.Counter objects with the counter values as tuple keys. eg: In [1]: from collections import Counter In [2]: from dataclasses import dataclass, asdict In [3]: c = Counter() In [4]: