internals.py 文件源码

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

项目:mongodb-monitoring 作者: jruaux 项目源码 文件源码
def _object_hook(dictionary):

        object_view = ObjectView(dictionary)
        stack = deque()
        stack.append((None, None, dictionary))

        while len(stack):
            instance, member_name, dictionary = stack.popleft()

            for name, value in dictionary.iteritems():
                if isinstance(value, dict):
                    stack.append((dictionary, name, value))

            if instance is not None:
                instance[member_name] = ObjectView(dictionary)

        return object_view
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号