A mixin that helps make an object easily updateable. Two Updateables are equal if all their public fields are equal.
Returns: a dict of fields whose name don’t start with underscore.
Update an object and then sync it with an external application.
It will copy the object into whatever is named in the ‘as’ clause, run the ‘with’ code block (which presumably alters the object). Then the update() method on the original object will be called with a dict containing only changed fields, and kwargs passed to this function.
If an exception is thrown by update(), the original object will be restored, otherwise the updated object will be returned.
with update(myrecord): myrecord.lastname = 'Smith'
Return a dict of fields that are different between old and new.