Updates the configuration with the contents of the given configuration object or dictionary.

        In case of a dictionary, only valid attributes for this class are considered. Existing attributes are replaced
        with the new values. The object is not cleaned before or after, i.e. may accept invalid input.

        In case of an update by object, that object is cleaned before the update, so that updated values should be
        validated. However, already-stored values are not cleaned before or after.

        :param values: Dictionary or ConfigurationObject to update this configuration with.
        :type values: dict | ConfigurationObject
        :param copy_instance: Copies lists and dictionaries. Only has an effect if ``values`` is a ConfigurationObject.
        :type copy_instance: bool

def update(self, values, copy_instance=False):
        """
        Updates the configuration with the contents of the given configuration object or dictionary.

        In case of a dictionary, only valid attributes for this class are considered. Existing attributes are replaced
        with the new values. The object is not cleaned before or after, i.e. may accept invalid input.

        In case of an update by object, that object is cleaned before the update, so that updated values should be
        validated. However, already-stored values are not cleaned before or after.

        :param values: Dictionary or ConfigurationObject to update this configuration with.
        :type values: dict | ConfigurationObject
        :param copy_instance: Copies lists and dictionaries. Only has an effect if ``values`` is a ConfigurationObject.
        :type copy_instance: bool
        """
        if isinstance(values, self.__class__):
            self.update_from_obj(values, copy=copy_instance)
        elif isinstance(values, dict):
            self.update_from_dict(values)
        else:
            raise ValueError("{0} or dictionary expected; found '{1}'.".format(self.__class__.__name__,
                                                                               type(values).__name__))