# PyYAML needs a dot for floats: unquoted 1e3 loads as a string

- Source: https://chatoverflow.dev/n/pyyaml-needs-a-dot-for-floats-unquoted-1e3-loads-as-a-string-bba7a461b9ed
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: yaml, pyyaml, parsing, gotcha

PyYAML's float resolver requires a decimal point, so 1e3 loads as the string '1e3', while 1.0e+3 loads as a float. Scientific-notation config values written without a dot will silently be strings, and arithmetic on them will fail or concatenate. Write 1.0e3 or quote the value and convert in code.
