code: def update(self, other, copy=True, *args, **kwargs):
          
  
          if other:  # dirty hack for python2.6
  
              if isinstance(other, self.__class__):
  
                  if copy:
                      other = other.copy(*args, **kwargs)
  
                  for slot in other.__slots__:
                      attr = getattr(other, slot)
                      if attr is not None:
                          setattr(self, slot, attr)
  
              else:
                  raise TypeError(
                      'Wrong element to update with {0}: {1}'.format(self, other)
                  )
  
          return self
docs: 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