def _is_num(data):
    """Verify if data is either int or float.

    Could be replaced by:

        from numbers import Number as number
        isinstance(data, number)

    but that requires Python v2.6+.
    """

    return isinstance(data, int) or isinstance(data, float)