def test_dict_evaluation_order(self):
    i = 0

    def f():
        nonlocal i
        i += 1
        return i
    d = {f(): f(), f(): f()}
    self.assertEqual(d, {1: 2, 3: 4})
def test_dict_evaluation_order(self):
    i = 0

    def f():
        nonlocal i
        i += 1
        return i
    d = {f(): f(), f(): f()}
    self.assertEqual(d, {1: 2, 3: 4})