def remove_objective(self, expr):
        expr = _remove_spaces(expr)
        obj = self._objectives.get(expr)
        if obj:
            obj.deactivate()
            del self._objectives[expr]
        else:
            self.parent.raise_exception("Trying to remove objective '%s' "
                                        "that is not in this driver." % expr,
                                        AttributeError)
        self.parent.config_changed()
Removes the specified objective expression. Spaces within
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.main/src/openmdao/main/hasobjective.py/HasObjectives.remove_objective