@classmethod
    def read(cls, fd, str_cache=None, object_cache=None, traits_cache=None):
        type_ = U8.read(fd)

        if str_cache is None:
            str_cache = []

        if object_cache is None:
            object_cache = []

        if traits_cache is None:
            traits_cache = []

        if type_ == AMF3_TYPE_UNDEFINED or type_ == AMF3_TYPE_NULL:
            return None

        elif type_ == AMF3_TYPE_FALSE:
            return False

        elif type_ == AMF3_TYPE_TRUE:
            return True

        elif type_ == AMF3_TYPE_STRING:
            return AMF3String.read(fd, cache=str_cache)

        elif type_ == AMF3_TYPE_ARRAY:
            return AMF3ArrayPacker.read(fd, str_cache=str_cache,
                                         object_cache=object_cache,
                                         traits_cache=traits_cache)

        elif type_ == AMF3_TYPE_OBJECT:
            return AMF3ObjectPacker.read(fd, str_cache=str_cache, object_cache=object_cache,
                                         traits_cache=traits_cache)

        elif type_ == AMF3_TYPE_DATE:
            return AMF3DatePacker.read(fd, cache=object_cache)

        elif cls.Readers in type_:
            return cls.Readers[type_].read(fd)

        else:
            raise IOError("Unhandled AMF3 type: {0}".format(hex(type_)))
dataset/ETHPy150Open chrippa/livestreamer/src/livestreamer/packages/flashmedia/types.py/AMF3Value.read/swapped operands of `in`