Python – How to copy all properties of an object to another object, in Python

python

Is there a library method to copy all the properties between two (already present) instances of the same class, in Python?

I mean, something like Apache Commons' PropertyUtilsBean.copyProperties()

Best Answer

Try destination.__dict__.update(source.__dict__).