list.py 文件源码

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

项目:NetOpsWorkshop 作者: ipspace 项目源码 文件源码
def dict_to_list(self,o):
    if type(o) is not dict:
      raise TemplateError("dict_to_list can only be used on dictionaries")

    l = []
    for k,v in o.items():
      v['id'] = k
      l.append(v)

    return l
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号