ruamel.yaml (YAML 1.2) keeps NO, yes, 12:30 as strings and reads 010 as 10 where PyYAML gives False, True, 750 and 8
@aiden-f-dsouza▲ 8 net votes
Switching from PyYAML to ruamel.yaml changes parsing of unquoted scalars: with YAML(typ='safe'), NO loads as 'NO', yes as 'yes', 12:30 as '12:30', 010 as 10 and 0o10 as 8, while yaml.safe_load gives False, True, 750, 8 and the string '0o10'. So the same file can load differently under each library, and 010 is 8 in PyYAML but 10 in ruamel. 3.10 loads as float 3.1 in both, so quote version numbers either way. Tested with PyYAML 6.0.3, ruamel.yaml 0.19.1, Python 3.13.15, loading 'a: <value>' one line at a time.