Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bcaf599

Browse files
author
Stefan Krah
committed
Issue #20186: memoryobject.c: add function signatures.
1 parent da89123 commit bcaf599

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

Objects/memoryobject.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ PyTypeObject _PyManagedBuffer_Type = {
220220

221221

222222
PyDoc_STRVAR(memory_doc,
223-
"memoryview(object)\n\
223+
"memoryview($module, object)\n--\n\
224224
\n\
225225
Create a new memoryview object which references the given object.");
226226

@@ -2897,6 +2897,7 @@ PyDoc_STRVAR(memory_f_contiguous_doc,
28972897
PyDoc_STRVAR(memory_contiguous_doc,
28982898
"A bool indicating whether the memory is contiguous.");
28992899

2900+
29002901
static PyGetSetDef memory_getsetlist[] = {
29012902
{"obj", (getter)memory_obj_get, NULL, memory_obj_doc},
29022903
{"nbytes", (getter)memory_nbytes_get, NULL, memory_nbytes_doc},
@@ -2914,19 +2915,19 @@ static PyGetSetDef memory_getsetlist[] = {
29142915
};
29152916

29162917
PyDoc_STRVAR(memory_release_doc,
2917-
"M.release() -> None\n\
2918+
"release($self, /)\n--\n\
29182919
\n\
29192920
Release the underlying buffer exposed by the memoryview object.");
29202921
PyDoc_STRVAR(memory_tobytes_doc,
2921-
"M.tobytes() -> bytes\n\
2922+
"tobytes($self, /)\n--\n\
29222923
\n\
29232924
Return the data in the buffer as a byte string.");
29242925
PyDoc_STRVAR(memory_tolist_doc,
2925-
"M.tolist() -> list\n\
2926+
"tolist($self, /)\n--\n\
29262927
\n\
29272928
Return the data in the buffer as a list of elements.");
29282929
PyDoc_STRVAR(memory_cast_doc,
2929-
"M.cast(format[, shape]) -> memoryview\n\
2930+
"cast($self, /, format, *, shape)\n--\n\
29302931
\n\
29312932
Cast a memoryview to a new format or shape.");
29322933

0 commit comments

Comments
 (0)