2-tuple; but raise KeyError if D is empty.
scipy.optimize.OptimizeResult.pop
scipy.optimize.OptimizeResult.setdefault