Is there an elegant way of replacing all the attributes of an instance,
except the primary key ?
Currently, I create a new object with all the date, fetch the old object
and do for k,v in new: old.__setattr__(k, v), taking care to skip the
primary key attribute. There's a custom __iter__ method
On Oct 7, 2010, at 5:37 AM, Alok G. Singh wrote:
Is there an elegant way of replacing all the attributes of an instance,
except the primary key ?
Currently, I create a new object with all the date, fetch the old object
and do for k,v in new: old.__setattr__(k, v), taking care to skip the