@classmethod
    def size(cls, val, str_cache=None, object_cache=None, traits_cache=None):
        if str_cache is None:
            str_cache = []

        if object_cache is None:
            object_cache = []

        if traits_cache is None:
            traits_cache = []

        size = U8.size

        if isinstance(val, bool) and val in (False, True):
            pass

        elif val is None:
            pass

        elif isinstance(val, integer_types):
            if AMF3_MIN_INTEGER < val or val > AMF3_MAX_INTEGER:
                size += AMF3Double.size
            else:
                size += AMF3Integer.size(val)

        elif isinstance(val, float):
            size += AMF3Double.size

        elif isinstance(val, (AMF3Array, list)):
            size += AMF3ArrayPacker.size(val, str_cache=str_cache,
                                         object_cache=object_cache,
                                         traits_cache=traits_cache)

        elif isinstance(val, string_types):
            size += AMF3String.size(val, cache=str_cache)

        elif isinstance(val, AMF3ObjectBase):
            size += AMF3ObjectPacker.size(val, str_cache=str_cache,
                                          object_cache=object_cache,
                                          traits_cache=traits_cache)

        elif isinstance(val, AMF3Date):
            size += AMF3DatePacker.size(val, cache=object_cache)

        else:
            raise ValueError("Unable to pack value of type {0}".format(type(val)))

        return size
dataset/ETHPy150Open chrippa/livestreamer/src/livestreamer/packages/flashmedia/types.py/AMF3Value.size/swapped operands of `<`