def __new__(cls, name, description=None):
    """Keep a dict of PermissionSetting instances, indexed by
        name. If the name already exists in the dict, return that
        instance rather than creating a new one.
        """
    instances = cls.__dict__.get('_z_instances')
    if instances is None:
        cls._z_instances = instances = {}
    it = instances.get(name)
    if it is None:
        instances[name] = it = object.__new__(cls)
        it._init(name, description)
    return it
