Relative Content

Tag Archive for pythonyamlruamel.yaml

ruamel.yaml – indicate preferred quoting style on dump

Following from this question, I’d like to set a preferred quoting style to be double-quotes, yet allow strings that can be represented as plain (no quotes) to be shown in plain. This is because I’m trying to fit a “house style” even though single quotes are valid yaml and maybe even preferable for some. Here’s a simple test-case: