def _to_timestamp(v, use_micros=False):
    # Expects Value to be either date or datetime
    if use_micros:
        scale = 1e6
        micro_scale = 1.0
    else:
        scale = 1e3
        micro_scale = 1e3

    try:
        converted = calendar.timegm(v.utctimetuple())
        converted = (converted * scale) + \
                    (getattr(v, 'microsecond', 0) / micro_scale)
    except AttributeError:
        # Ints and floats are valid timestamps too
        if marshal._number_types not in type(v):
            raise TypeError('DateType arguments must be a datetime or timestamp')

        converted = v * scale
    return long(converted)
dataset/ETHPy150Open pycassa/pycassa/pycassa/types.py/_to_timestamp/swapped operands of `not in`