def set(self, key, val, env=None):
        if env is None:
            env = self.environment
        else:
            if env not in self._settings:
                raise exc.EnvironmentNotFound("There is no environment named "
                        "'%s'." % env)
        dct = self._settings[env]
        if key not in dct:
            raise exc.InvalidSetting("The setting '%s' is not defined." % key)
        dct[key] = val
        if key == "identity_type":
            # If setting the identity_type, also change the identity_class.
            dct["identity_class"] = _import_identity(val)
        elif key == "region":
            if not identity:
                return
            current = identity.region
            if current == val:
                return
            if "LON" in (current, val):
                # This is an outlier, as it has a separate auth
                identity.region = val
        elif key == "verify_ssl":
            if not identity:
                return
            identity.verify_ssl = val
Changes the value for the setting specified by 'key' to the new value.
dataset/ETHPy150Open rackspace/pyrax/pyrax/__init__.py/Settings.set