summaryrefslogtreecommitdiffstats
path: root/Objects/dictobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2021-09-19 15:05:30 (GMT)
committerGitHub <noreply@github.com>2021-09-19 15:05:30 (GMT)
commitf25f2e2e8c8e48490d22b0cdf67f575608701f6f (patch)
tree5357fbf7251027bd5eed255a4f22639b0119d7a7 /Objects/dictobject.c
parenta6241773869b80f2b1cac63f26ba646aa808a8db (diff)
downloadcpython-f25f2e2e8c8e48490d22b0cdf67f575608701f6f.zip
cpython-f25f2e2e8c8e48490d22b0cdf67f575608701f6f.tar.gz
cpython-f25f2e2e8c8e48490d22b0cdf67f575608701f6f.tar.bz2
Clean up initialization __class_getitem__ with Py_GenericAlias. (GH-28450)
The cast to PyCFunction is redundant. Overuse of redundant casts can hide actual bugs.
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r--Objects/dictobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 85122ec..ae0098b 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -3294,7 +3294,7 @@ static PyMethodDef mapp_methods[] = {
{"copy", (PyCFunction)dict_copy, METH_NOARGS,
copy__doc__},
DICT___REVERSED___METHODDEF
- {"__class_getitem__", (PyCFunction)Py_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")},
+ {"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")},
{NULL, NULL} /* sentinel */
};