def update(self, other=None, **kwargs):
if other is not None:<EOL><INDENT>if isinstance(other, dict):<EOL><INDENT>for key in other:<EOL><INDENT>self[key] = other[key]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>super(MergingDict, self).update(other)<EOL><DEDENT><DEDENT>for key in kwargs:<EOL><INDENT>self._merge(key, kwargs[key])<EOL><DEDENT>
A special update method to handle merging of dict objects. For all
other iterable objects, we use the parent class update method. For
other objects, we simply make use of the internal merging logic.

:param other: An iterable object.
:type other: dict or object
:param kwargs: key/value pairs to update.
:rtype: None