From 0361556537686f857f1025ead75e6af4ca7cc94a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Batuhan=20Ta=C5=9Fkaya?= Date: Fri, 10 Apr 2020 17:46:36 +0300 Subject: bpo-39481: PEP 585 for a variety of modules (GH-19423) - concurrent.futures - ctypes - http.cookies - multiprocessing - queue - tempfile - unittest.case - urllib.parse --- Modules/_ctypes/_ctypes.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Modules/_ctypes/_ctypes.c') diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index dab3939647..ba5ef397cf 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -4798,6 +4798,12 @@ Array_length(PyObject *myself) return self->b_length; } +static PyMethodDef Array_methods[] = { + {"__class_getitem__", (PyCFunction)Py_GenericAlias, + METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + { NULL, NULL } +}; + static PySequenceMethods Array_as_sequence = { Array_length, /* sq_length; */ 0, /* sq_concat; */ @@ -4846,7 +4852,7 @@ PyTypeObject PyCArray_Type = { 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ - 0, /* tp_methods */ + Array_methods, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ -- cgit v1.2.1