6.6.2
clone_traits()
This method copies trait attributes from one object to
another. It can copy specified attributes, all explicitly defined trait
attributes, or all explicitly and implicitly defined trait attributes on the
source object.
This method is useful if you want to allow a user to edit
a clone of an object, so that changes are made permanent only when the user
commits them. In such a case, you might clone an object and its trait
attributes; allow the user to modify the clone; and then re-clone only the
trait attributes back to the original object when the user commits changes.
|