mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +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
|
|
@ -1144,7 +1144,7 @@ static PyMethodDef mappingproxy_methods[] = {
|
|||
PyDoc_STR("D.items() -> list of D's (key, value) pairs, as 2-tuples")},
|
||||
{"copy", (PyCFunction)mappingproxy_copy, METH_NOARGS,
|
||||
PyDoc_STR("D.copy() -> a shallow copy of D")},
|
||||
{"__class_getitem__", (PyCFunction)Py_GenericAlias, METH_O|METH_CLASS,
|
||||
{"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS,
|
||||
PyDoc_STR("See PEP 585")},
|
||||
{"__reversed__", (PyCFunction)mappingproxy_reversed, METH_NOARGS,
|
||||
PyDoc_STR("D.__reversed__() -> reverse iterator")},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue