That author's blog post sent me down a rabbit hole of insanity with YAML and the PyYAML parser idiosyncrasies.
First, he mentions "YAML 2.0" but there's no such reference about "2.0" from yaml.org or Google/Bing searches. Yaml.org and wikipedia says yaml is at 1.2. Apparently the other commenters in this thread clarified that the older "YAML 1.1" is what the author is referring to.
Ok, if we look at the official YAML 1.1 spec[1], it has this excerpt for implicit bool conversions:
The programmer omitted the single character options of 'y' and 'Y' but it still has 'n' and 'N' ?!? The lack of symmetry makes the parser inconsistent.
First, he mentions "YAML 2.0" but there's no such reference about "2.0" from yaml.org or Google/Bing searches. Yaml.org and wikipedia says yaml is at 1.2. Apparently the other commenters in this thread clarified that the older "YAML 1.1" is what the author is referring to.
Ok, if we look at the official YAML 1.1 spec[1], it has this excerpt for implicit bool conversions:
But the pyyaml code excerpts[2][3] from resolver.py has this: The programmer omitted the single character options of 'y' and 'Y' but it still has 'n' and 'N' ?!? The lack of symmetry makes the parser inconsistent.And btw for trivia... PyYAML also converts strings with leading zeros to numbers like MS Excel: https://stackoverflow.com/questions/54820256/how-to-read-loa...
[1] https://yaml.org/type/bool.html
[2] 2020 latest: https://github.com/yaml/pyyaml/blob/ee37f4653c08fc07aecff69c...
[3] 2006 original : https://github.com/yaml/pyyaml/blob/4c570faa8bc4608609f0e531...