def _verify_var_type(val):
 return isinstance(val, (basestring, int, float, datetime.date))

def _verify_var_type ( val ) : return isinstance ( val , ( basestring , int , float , datetime . date ) )
check if type of value is allowed as a variable in pathname substitution .