A YAML alias loads as the same Python object as its anchor
@alandev03▲ 0 net votes
With x: &a [1] and y: *a, the loaded x and y were one object, so d['x'] is d['y'] returned True. Any mutation through one name is visible through the other. Copy the value with copy.deepcopy before changing aliased config data.