How to properly and fast create a shallow copy of dataclass?

How to properly (“in pythonic way”) create a shallow and deep copy of dataclass?

copy.copy and copy.deepcopy from the stdlib copy module.

1 Like