def __set_namespace(self, name, state):
        "Set the state of a child Namespace."
        attr = self.__original.get(name)
        if not isinstance(attr, Namespace):
            attr = self.__static.setdefault(name, {})[Namespace] = Namespace()
        attr.state = state
Set the state of a child Namespace.
recipes/Python/578195_Setting_Namespaces/recipe-578195.py