I'm trying to debug an issue, and it boils down to...
>>> import yaml as pyyaml
>>> import ruamel.yaml as ruamel
>>> ruamel.load("x: yes") == ruamel.load("x: true")
False
>>> pyyaml.safe_load("x: yes") == pyyaml.safe_load("x: true")
True
There are rumors on the internet about "yes" and "no" being reserved words that are also synonyms for true
and false
respectively.
But there is only passing mention in the 1.1 spec but no elaboration, and the string "yes" doesn't appear in the 1.2 spec at all.
In fact looking through every draft of the spec it only appears in a legitimate way in any kind of legitimate way in https://yaml.org/spec/history/2002-09-01.html and is removed in the revision after.
I suspect I've answered my own question in the course of writing it, but... is this business about "yes/no" just nonsense that made its way into implementations (my editor is even highlighting "yes/no" as special), or am I misunderstanding or missing part of the spec?