Python dataclass from a nested dict
问题 The standard library in 3.7 can recursively convert a dataclass into a dict (example from the docs): from dataclasses import dataclass, asdict from typing import List @dataclass class Point: x: int y: int @dataclass class C: mylist: List[Point] p = Point(10, 20) assert asdict(p) == {'x': 10, 'y': 20} c = C([Point(0, 0), Point(10, 4)]) tmp = {'mylist': [{'x': 0, 'y': 0}, {'x': 10, 'y': 4}]} assert asdict(c) == tmp I am looking for a way to turn a dict back into a dataclass when there is