def __set_state(self, state):
        "Set the state of this Namespace and any child Namespaces."
        dispatch = {Namespace: self.__set_namespace,
                    Parameter: self.__set_parameter}
        for name, box in state.items():
            for type_, value in box.items():
                dispatch[type_](name, value)
Set the state of this Namespace and any child Namespaces.
recipes/Python/578195_Setting_Namespaces/recipe-578195.py