If I write `d = {0: 1, 0: 2}`, does Python guarantee the value of `d[0]`, or is it "undefined behavior"?

(Of course, this isn't something you'd *ever* write when programming, but this question is mostly out of curiosity. Locally, it seems to always save the value associated with the key's last occurrence, i.e. `2` here. Maybe it's useful info for some weird code gen situations, though.)