What is equivalent of *this = that in python?
Larry Bates
larry.bates at websafe.com
Fri Jun 1 12:09:00 EDT 2007
Carsten Haese wrote:
> 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,
>
Have you looked at Pyro? Maybe it would work for you.
http://pyro.sourceforge.net/
-Larry
More information about the Python-list
mailing list