parameters: (self, other=None, **kwargs)
docstring: Set metadata values from the given iterable `other` and kwargs.
  
  
  
          Behavior is like `dict.update`: If `other` has a ``keys`` method,
  
          they are looped over and ``self[key]`` is assigned ``other[key]``.
  
          Else, ``other`` is an iterable of ``(key, value)`` iterables.
  
  
  
          Keys that don't match a metadata field or that have an empty value are
  
          dropped.
docstring_summary: Set metadata values from the given iterable `other` and kwargs.
docstring_tokens: Set metadata values from the given iterable other and kwargs .
function: def update(self, other=None, **kwargs):
  
          """Set metadata values from the given iterable `other` and kwargs.
  
  
  
          Behavior is like `dict.update`: If `other` has a ``keys`` method,
  
          they are looped over and ``self[key]`` is assigned ``other[key]``.
  
          Else, ``other`` is an iterable of ``(key, value)`` iterables.
  
  
  
          Keys that don't match a metadata field or that have an empty value are
  
          dropped.
  
          """
  
          def _set(key, value):
  
              if key in _ATTR2FIELD and value:
  
                  self.set(self._convert_name(key), value)
  
  
  
          if not other:
  
              # other is None or empty container
  
              pass
  
          elif hasattr(other, 'keys'):
  
              for k in other.keys():
  
                  _set(k, other[k])
  
          else:
  
              for k, v in other:
  
                  _set(k, v)
  
  
  
          if kwargs:
  
              for k, v in kwargs.items():
  
                  _set(k, v)
function_tokens: def update ( self , other = None , * * kwargs ) : def _set ( key , value ) : if key in _ATTR2FIELD and value : self . set ( self . _convert_name ( key ) , value ) if not other : # other is None or empty container pass elif hasattr ( other , 'keys' ) : for k in other . keys ( ) : _set ( k , other [ k ] ) else : for k , v in other : _set ( k , v ) if kwargs : for k , v in kwargs . items ( ) : _set ( k , v )