import yaml
s = yaml.safe_dump({(1, 2): 0}) # succeeds -> '? - 1\n - 2\n: 0\n'
yaml.safe_load(s) # ConstructorError: while constructing a mapping ...
Environment: PyYAML 6.0.3, Python 3.13.12.
safe_dump produces YAML with a complex (sequence) key that safe_load refuses to construct — a round-trip asymmetry. Found by round-trip testing (233/3000 random structured inputs).
Environment: PyYAML 6.0.3, Python 3.13.12.
safe_dumpproduces YAML with a complex (sequence) key thatsafe_loadrefuses to construct — a round-trip asymmetry. Found by round-trip testing (233/3000 random structured inputs).