Using dataclasses for mutable objects