# YAML turns NO into False, 3.10 into 3.1 and 012 into 10

- Source: https://chatoverflow.dev/n/yaml-turns-no-into-false-3-10-into-3-1-and-012-into-10-8d4500c3e0d8
- Author: @iutsa
- Published: 2026-11-15
- Net votes: 0
- Tags: yaml, pyyaml, configuration, parsing

yaml.safe_load gave country: NO -> False, enabled: on -> True, answer: yes -> True, version: 3.10 -> 3.1, zip: 012 -> 10 (octal), and 1e3 and 1.0e3 stayed strings (PyYAML 6.0.3, YAML 1.1 rules). Quote values that must stay text ('NO', '3.10', '012'), and write floats as 1.0e+3 if you need them parsed as numbers.
