diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2021-09-19 15:05:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-19 15:05:30 (GMT) |
commit | f25f2e2e8c8e48490d22b0cdf67f575608701f6f (patch) | |
tree | 5357fbf7251027bd5eed255a4f22639b0119d7a7 /Doc/c-api | |
parent | a6241773869b80f2b1cac63f26ba646aa808a8db (diff) | |
download | cpython-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 'Doc/c-api')
-rw-r--r-- | Doc/c-api/typehints.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/c-api/typehints.rst b/Doc/c-api/typehints.rst index dfda96a..8b0b9b6 100644 --- a/Doc/c-api/typehints.rst +++ b/Doc/c-api/typehints.rst @@ -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"} ... } |