Esempio n. 1
0
def translate_from(instance: Model):
    try:
        return True, typic.translate(instance, Model)
    except (ValueError, TypeError) as err:
        return False, err
Esempio 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