odict.py 文件源码

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

项目:CTAtools 作者: davidsanchez 项目源码 文件源码
def __init__(self, *args, **kwds):
            '''Initialize an ordered dictionary.  Signature is the same as for
            regular dictionaries, but keyword arguments are not recommended
            because their insertion order is arbitrary.

            '''
            if len(args) > 1:
                raise TypeError('expected at most 1 arguments, got %d' % len(args))
            try:
                self.__root
            except AttributeError:
                self.__root = root = [None, None, None]     # sentinel node
                PREV = 0
                NEXT = 1
                root[PREV] = root[NEXT] = root
                self.__map = {}
            self.update(*args, **kwds)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号