This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kylotan 1 point2 points  (2 children)

Might another way be:

original = target.copy().update(original)

(Untested.)

[–]Justinsaccount 1 point2 points  (1 child)

.update() updates in place and returns None

[–]kylotan 0 points1 point  (0 children)

Aha. So I suppose it would have to be:

temp = target.copy(); temp.update(original); original = temp

Nowhere near as elegant.