YAML spec in version 1.2 says that in a valid YAML file, mapping keys are unique.
This is not the case in pyyaml, as can be seen by loading this sample file:
The correct result from loading this file is an error. pyyaml instead naively overwrites results with the last key, resulting in this dict: {'a': {'q': 'b'}}.