Ejemplo n.º 1
0
def translate_from(instance: Model):
    try:
        return True, typic.translate(instance, Model)
    except (ValueError, TypeError) as err:
        return False, err
Ejemplo n.º 2
0
def translate_to(instance: Model, target: Type):
    try:
        return True, typic.translate(instance, target)
    except (ValueError, TypeError) as err:
        return False, err