我希望能够转储一个字典,其中包含我希望在块样式中具有的长字符串以便于阅读.例如:
foo: | this is a block literal bar: > this is a folded block
PyYAML支持使用这种样式加载文档,但我似乎找不到以这种方式转储文档的方法.我错过了什么吗?
python yaml pyyaml
python ×1
pyyaml ×1
yaml ×1