mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-96364: Fix text signatures of __getitem__
for list
and dict
(GH-96365)
This commit is contained in:
parent
569ca27293
commit
30cc1901ef
3 changed files with 5 additions and 2 deletions
|
@ -3591,7 +3591,8 @@ dict_ior(PyObject *self, PyObject *other)
|
|||
return self;
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(getitem__doc__, "x.__getitem__(y) <==> x[y]");
|
||||
PyDoc_STRVAR(getitem__doc__,
|
||||
"__getitem__($self, key, /)\n--\n\nReturn self[key].");
|
||||
|
||||
PyDoc_STRVAR(sizeof__doc__,
|
||||
"D.__sizeof__() -> size of D in memory, in bytes");
|
||||
|
|
|
@ -2824,7 +2824,8 @@ static PyObject *list_iter(PyObject *seq);
|
|||
static PyObject *list_subscript(PyListObject*, PyObject*);
|
||||
|
||||
static PyMethodDef list_methods[] = {
|
||||
{"__getitem__", (PyCFunction)list_subscript, METH_O|METH_COEXIST, "x.__getitem__(y) <==> x[y]"},
|
||||
{"__getitem__", (PyCFunction)list_subscript, METH_O|METH_COEXIST,
|
||||
PyDoc_STR("__getitem__($self, index, /)\n--\n\nReturn self[index].")},
|
||||
LIST___REVERSED___METHODDEF
|
||||
LIST___SIZEOF___METHODDEF
|
||||
LIST_CLEAR_METHODDEF
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue