__init__.py 文件源码

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

项目:Locus 作者: senditya 项目源码 文件源码
def collect_topics():
    topic_dict = dict()
    app.logger.debug("Inside Collected Topics - Number of connected clients: " + str(len(client_dict)))
    for sid in client_dict.keys():
        for interest in client_dict[sid].keys():
            for region in client_dict[sid][interest].keys():
                if client_dict[sid][interest][region][0]:
                    topic = interest + '_' + region
                    try:
                        if client_dict[sid][interest][region][1] < topic_dict[topic]:
                            topic_dict[topic] = client_dict[sid][interest][region][1]
                    except KeyError:
                        topic_dict[topic] = client_dict[sid][interest][region][1]
    app.logger.debug("Topic Dict: " + str(topic_dict))
    return topic_dict
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号