OSC.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:LiveScript 作者: rekliner 项目源码 文件源码
def __setitem__(self, i, val):
        """Set indicatated argument (or slice) to a new value.
        'val' can be a single int/float/string, or a (typehint, value) tuple.
        Or, if 'i' is a slice, a list of these or another OSCMessage.
        """
        items = self.items()

        new_items = self._buildItemList(val)

        if type(i) != types.SliceType:
            if len(new_items) != 1:
                raise TypeError("single-item assignment expects a single value or a (typetag, value) tuple")

            new_items = new_items[0]

        # finally...
        items[i] = new_items

        self._reencode(items)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号