(value, our_type)
return value is None or {
        'string': lambda x: isinstance(x, str),
        'uint': lambda x: isinstance(x, int) and x >= 0,
        'double': lambda x: isinstance(x, float) or isinstance(x, int),
    }[our_type](value)
Checks if value matches our_type
Checks if value matches our_type
Checks if value matches our_type
def match_type(value, our_type):
    '''Checks if value matches our_type'''
    return value is None or {
        'string': lambda x: isinstance(x, str),
        'uint': lambda x: isinstance(x, int) and x >= 0,
        'double': lambda x: isinstance(x, float) or isinstance(x, int),
    }[our_type](value)
def match_type ( value , our_type ) : return value is None or { 'string' : lambda x : isinstance ( x , str ) , 'uint' : lambda x : isinstance ( x , int ) and x >= 0 , 'double' : lambda x : isinstance ( x , float ) or isinstance ( x , int ) , } [ our_type ] ( value )