From: Andrew M. Kuchling Date: Sat, 4 Oct 2008 01:04:24 +0000 (+0000) Subject: Docstring changes: Specify exceptions raised X-Git-Tag: v2.7a1~2779 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d810cdf8491632089733ba260a29a1e0693c7b6b;p=thirdparty%2FPython%2Fcpython.git Docstring changes: Specify exceptions raised --- diff --git a/Objects/listobject.c b/Objects/listobject.c index 10f2c5da259b..e8379e181bb8 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -2459,11 +2459,14 @@ PyDoc_STRVAR(extend_doc, PyDoc_STRVAR(insert_doc, "L.insert(index, object) -- insert object before index"); PyDoc_STRVAR(pop_doc, -"L.pop([index]) -> item -- remove and return item at index (default last)"); +"L.pop([index]) -> item -- remove and return item at index (default last).\n" +"Raises IndexError if list is empty or index is out of range."); PyDoc_STRVAR(remove_doc, -"L.remove(value) -- remove first occurrence of value"); +"L.remove(value) -- remove first occurrence of value.\n" +"Raises ValueError if the value is not present."); PyDoc_STRVAR(index_doc, -"L.index(value, [start, [stop]]) -> integer -- return first index of value"); +"L.index(value, [start, [stop]]) -> integer -- return first index of value.\n" +"Raises ValueError if the value is not present."); PyDoc_STRVAR(count_doc, "L.count(value) -> integer -- return number of occurrences of value"); PyDoc_STRVAR(reverse_doc,