yamlutils.py 文件源码

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

项目:scriptcwl 作者: NLeSC 项目源码 文件源码
def str_presenter(dmpr, data):
    """Return correct str_presenter to write multiple lines to a yaml field.


    Source: http://stackoverflow.com/a/33300001
    """
    if is_multiline(data):
        return dmpr.represent_scalar('tag:yaml.org,2002:str', data, style='|')
    return dmpr.represent_scalar('tag:yaml.org,2002:str', data)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号