def copyDataclass(Class, oldInst):
    """Copy an existing dataclass object by creating a new instance and copying its members.
    
    Note:
      - Simply copying a data-class object copies it's *address*, and doesn't make a *data copy*.
    
    Parameters:
      Class (class):    the (name of the) class.
      oldInst (Class):  the existing object.
    
    Returns:
      (Class):  the new object.
    
    See:
      - https://stackoverflow.com/a/57962958/1386750
    
    """
    from dataclasses import fields
    newInst = Class
    for field in fields(Class):
        setattr(newInst, field.name, getattr(oldInst, field.name))
    return newInst
