Beispiel #1
0
def function_output_builtin(value):
    from valid8 import validate_out
    from valid8.validation_lib import instance_of, gt

    @validate_out(instance_of(Integral), gt(0))
    def my_function2():
        return value

    my_function2()
Beispiel #2
0
def function_input_builtin(value):
    from valid8 import validate_arg
    from valid8.validation_lib import instance_of, gt

    @validate_arg('x', instance_of(Integral), gt(0))
    def my_function(x):
        pass

    my_function(value)