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