How to change an anchored scalar in a sequence without destroying the anchor in ruamel.yaml?
- 阅读更多 关于 How to change an anchored scalar in a sequence without destroying the anchor in ruamel.yaml?
问题 When using ruamel.yaml version 0.15.92 with Python 3.6.6 on CentOS 7, I cannot seem to update the value of an anchored scalar in a sequence without destroying the anchor itself or creating invalid YAML from the next dump. I have attempted to recreate the original node type with the new value (old PlainScalarString -> new PlainScalarString , old FoldedScalarString -> new FoldedScalarString , etc), copying the anchor to it. While this restores the anchor to the updated scalar value, it also