rc.py 文件源码

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

项目:jack 作者: jack-cli-cd-ripper 项目源码 文件源码
def convert(cf):
    rc = []
    for i in cf.keys():
        if cf[i]['type'] == types.StringType:
            rc.append([i, cf[i]['val'], None])
        elif cf[i]['type'] == types.FloatType:
            rc.append([i, `cf[i]['val']`, None])
        elif cf[i]['type'] == types.IntType:
            rc.append([i, `cf[i]['val']`, None])
        elif cf[i]['type'] == 'toggle':
            rc.append([i, write_yes(cf[i]['val']), 'toggle'])
        elif cf[i]['type'] == types.ListType:
            rc.append([i, `cf[i]['val']`, None])
        else:
            error("don't know how to handle " + `cf[i]['type']`)
    return rc
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号