functools32.py 文件源码

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

项目:deb-python-functools32 作者: openstack 项目源码 文件源码
def __eq__(self, other):
        '''od.__eq__(y) <==> od==y.  Comparison to another OD is order-sensitive
        while comparison to a regular mapping is order-insensitive.

        '''
        if isinstance(other, OrderedDict):
            return len(self)==len(other) and \
                   all(p==q for p, q in zip(self.items(), other.items()))
        return dict.__eq__(self, other)

# update_wrapper() and wraps() are tools to help write
# wrapper functions that can handle naive introspection
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号