What is equivalent of *this = that in python?
Carsten Haese
carsten at uniqsys.com
Fri Jun 1 12:01:13 EDT 2007
On Fri, 2007-06-01 at 11:53 -0400, Emin.shopper Martinian.shopper wrote:
> I have a distributed application using xmlrpc and I'd like for a local
> object to sync itself to match a remote version of the object. I
> realize that I can copy all the attributes from the remote object to
> the local object, but that seems like an ugly solution. There must be
> a better way...
Copying the attributes will do the trick, and you should be able to do
this in one shot with something like
self.__dict__.update(other.__dict__)
HTH,
--
Carsten Haese
http://informixdb.sourceforge.net
More information about the Python-list
mailing list