mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
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:
parent
a624177386
commit
f25f2e2e8c
17 changed files with 21 additions and 21 deletions
|
|
@ -31,7 +31,7 @@ two types exist -- :ref:`GenericAlias <types-genericalias>` and
|
|||
static PyMethodDef my_obj_methods[] = {
|
||||
// Other methods.
|
||||
...
|
||||
{"__class_getitem__", (PyCFunction)Py_GenericAlias, METH_O|METH_CLASS, "See PEP 585"}
|
||||
{"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, "See PEP 585"}
|
||||
...
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue