Given two instances of the same dataclass, how can I update the first one in-place with values from the second one?
i.e.
@dataclass
class Foo:
a: str
b: int
f1 = Foo("foo", 1)
f2 = Foo("bar", 2)
# Update in place, so that f1.a == f2.a, f1.b == f2.b and so on
Note: I do not want to simply set f1 = f2
; I want to update f1
in place.