Use new exceptions.

This commit is contained in:
Guido van Rossum 1991-12-10 14:00:03 +00:00
parent 97ff5308fe
commit 87e7ea72a6
8 changed files with 39 additions and 48 deletions

View file

@ -543,7 +543,7 @@ listindex(self, args)
if (cmpobject(self->ob_item[i], args) == 0)
return newintobject(i);
}
err_setstr(RuntimeError, "list.index(x): x not in list");
err_setstr(ValueError, "list.index(x): x not in list");
return NULL;
}
@ -586,7 +586,7 @@ listremove(self, args)
}
}
err_setstr(RuntimeError, "list.remove(x): x not in list");
err_setstr(ValueError, "list.remove(x): x not in list");
return NULL;
}