(f)
return typecheck_result_wrap
Performs type checking on the return value using the global environment
Performs type checking on the return value using the global environment
Performs type checking on the return value using the global environment
def typecheck_result(f):
    """Performs type checking on the return value using the global environment"""

    @wraps(f)
    def typecheck_result_wrap(*args, **kwargs):
        res = f(*args, **kwargs)
        res.get_type() # This raises an exception if an invalid type is found
    return typecheck_result_wrap
def typecheck_result ( f ) : @ wraps ( f ) def typecheck_result_wrap ( * args , * * kwargs ) : res = f ( * args , * * kwargs ) res . get_type ( ) # This raises an exception if an invalid type is found return typecheck_result_wrap