def update(self, other, copy=True, *args, **kwargs):
if other:  <EOL><INDENT>if isinstance(other, self.__class__):<EOL><INDENT>if copy:<EOL><INDENT>other = other.copy(*args, **kwargs)<EOL><DEDENT>for slot in other.__slots__:<EOL><INDENT>attr = getattr(other, slot)<EOL>if attr is not None:<EOL><INDENT>setattr(self, slot, attr)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>raise TypeError(<EOL>'<STR_LIT>'.format(self, other)<EOL>)<EOL><DEDENT><DEDENT>return self<EOL>
Update this element related to other element.

        :param other: same type than this.
        :param bool copy: copy other before update attributes.
        :param tuple args: copy args.
        :param dict kwargs: copy kwargs.
        :return: this