diff options
author | Georg Brandl <georg@python.org> | 2011-10-08 16:32:40 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-10-08 16:32:40 (GMT) |
commit | 388349add2566823ed18b50b790feaca3559197c (patch) | |
tree | 8882414e1ce51b42aeaa0e70fca8593681db4f3e /Objects/listobject.c | |
parent | 30589c9041c906ad63a2c286038f8ef1e2f33fc0 (diff) | |
download | cpython-388349add2566823ed18b50b790feaca3559197c.zip cpython-388349add2566823ed18b50b790feaca3559197c.tar.gz cpython-388349add2566823ed18b50b790feaca3559197c.tar.bz2 |
Closes #12192: Document that mutating list methods do not return the instance (original patch by Mike Hoy).
Diffstat (limited to 'Objects/listobject.c')
-rw-r--r-- | Objects/listobject.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c index 28d94e7..049f2a8 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -2329,16 +2329,16 @@ PyDoc_STRVAR(clear_doc, PyDoc_STRVAR(copy_doc, "L.copy() -> list -- a shallow copy of L"); PyDoc_STRVAR(append_doc, -"L.append(object) -- append object to end"); +"L.append(object) -> None -- append object to end"); PyDoc_STRVAR(extend_doc, -"L.extend(iterable) -- extend list by appending elements from the iterable"); +"L.extend(iterable) -> None -- extend list by appending elements from the iterable"); 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).\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.\n" +"L.remove(value) -> None -- 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.\n" @@ -2348,7 +2348,7 @@ PyDoc_STRVAR(count_doc, PyDoc_STRVAR(reverse_doc, "L.reverse() -- reverse *IN PLACE*"); PyDoc_STRVAR(sort_doc, -"L.sort(key=None, reverse=False) -- stable sort *IN PLACE*"); +"L.sort(key=None, reverse=False) -> None -- stable sort *IN PLACE*"); static PyObject *list_subscript(PyListObject*, PyObject*); |