util.py 文件源码

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

项目:deb-python-cassandra-driver 作者: openstack 项目源码 文件源码
def _diff(self, other):
        diff = sortedset()
        if isinstance(other, self.__class__):
            i = 0
            for item in self._items:
                i = bisect_left(other._items, item, i)
                if i < len(other._items):
                    if item != other._items[i]:
                        diff._items.append(item)
                else:
                    diff._items.append(item)
        else:
            for item in self._items:
                if item not in other:
                    diff.add(item)
        return diff
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号