summaryrefslogtreecommitdiff
path: root/Objects/listobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-12-10 14:00:03 +0000
committerGuido van Rossum <guido@python.org>1991-12-10 14:00:03 +0000
commite48efdc3cb2595d37e24b28daadb27f61ff4ae32 (patch)
tree0482b0b111b4779a18f680db9a1c5bd10ca0005f /Objects/listobject.c
parent75036dac0df70ef024c5094810b87dd15332e754 (diff)
downloadcpython-e48efdc3cb2595d37e24b28daadb27f61ff4ae32.tar.gz
Use new exceptions.
Diffstat (limited to 'Objects/listobject.c')
-rw-r--r--Objects/listobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 18bdbcacb4..2e2b9a24f3 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -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;
}