Clean up initialization __class_getitem__ with Py_GenericAlias. (GH-28450)

The cast to PyCFunction is redundant. Overuse of redundant casts
can hide actual bugs.
This commit is contained in:
Serhiy Storchaka 2021-09-19 18:05:30 +03:00 committed by GitHub
parent a624177386
commit f25f2e2e8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 21 additions and 21 deletions

View file

@ -1499,7 +1499,7 @@ static PyMethodDef async_gen_methods[] = {
{"asend", (PyCFunction)async_gen_asend, METH_O, async_asend_doc},
{"athrow",(PyCFunction)async_gen_athrow, METH_VARARGS, async_athrow_doc},
{"aclose", (PyCFunction)async_gen_aclose, METH_NOARGS, async_aclose_doc},
{"__class_getitem__", (PyCFunction)Py_GenericAlias,
{"__class_getitem__", Py_GenericAlias,
METH_O|METH_CLASS, PyDoc_STR("See PEP 585")},
{NULL, NULL} /* Sentinel */
};