def _cast_number(value): "Convert numbers as string to an int or float" if "." in value or "E" in value or "e" in value: value = float(value) else: value = long(value) return value
def _cast_number(value): "Convert numbers as string to an int or float" m = FLOAT_REGEX.search(value) if m is not None: return float(value) return long(value)
def _cast_number(value): "Convert numbers as string to an int or float" m = FLOAT_REGEX.search(value) if m is not None: return float(value) return long(value)