def is_type_factory(_type):
 def inner(x):
  if (type(x) != _type):
   raise ValueError(("Value must have type '%s'" % str(_type)))
 return inner

def is_type_factory ( _type ) : def inner ( x ) : if ( type ( x ) != _type ) : raise ValueError ( ( "Value must have type '%s'" % str ( _type ) ) ) return inner
parameters _type - a type to be compared against (e .