def __init__(self, **schema):
        "Initialize the Namespace instance with a schema definition."
        self.__original, self.__dynamic, self.__static, self.__owner = \
            {}, {}, {}, None
        for name, value in schema.items():
            if isinstance(value, _Settings):
                if isinstance(value, Namespace):
                    if value.__owner is not None:
                        raise ValueError(repr(name) + 'has an owner!')
                    value.__owner = self
                self.__original[name] = value
            else:
                raise TypeError(repr(name) + ' has bad type!')
Initialize the Namespace instance with a schema definition.
recipes/Python/578195_Setting_Namespaces/recipe-578195.py