def _get_type ( self , value ) : if value is None : return type ( None ) elif type ( value ) in int_types : return int elif type ( value ) in float_types : return float elif isinstance ( value , binary_type ) : return binary_type else : return text_type
python code tell what type of data
Get the data type for * value * .
def _get_type(self, value):
        """Get the data type for *value*."""
        if value is None:
            return type(None)
        elif type(value) in int_types:
            return int
        elif type(value) in float_types:
            return float
        elif isinstance(value, binary_type):
            return binary_type
        else:
            return text_type