Well, [(Item1.a, Item2.a), (Item1.b, Item2.b)] just creates a list of tuples of some values. Already creating this, you will lose connection with ItemX . Your problem is not loop related.
Maybe you want
for prop in ('a', 'b'): i2prop = getattr(Item2, prop) if getattr(Item1, prop) != i2prop: setattr(Item1, prop, i2prop)
Or something similar, but with passing ItemX to the loop:
for x, y, prop in ((Item1, Item2, 'a'), (Item1, Item2, 'b')): yprop = getattr(y, prop) if getattr(x, prop) != yprop: setattr(x, prop, yprop)
source share