summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBrian Schubert <brianm.schubert@gmail.com>2024-10-27 10:36:03 (GMT)
committerGitHub <noreply@github.com>2024-10-27 10:36:03 (GMT)
commitdc76a4ad3c46af3fb70361be10b8a791cd126931 (patch)
tree7317ae11300bdcf5da1d4b9c0a075bb96012f05c /Objects
parentdad34531298fc0ea91b9000aafdd2ea2fce5e54a (diff)
downloadcpython-dc76a4ad3c46af3fb70361be10b8a791cd126931.zip
cpython-dc76a4ad3c46af3fb70361be10b8a791cd126931.tar.gz
cpython-dc76a4ad3c46af3fb70361be10b8a791cd126931.tar.bz2
gh-126012: Add `__class_getitem__` to `memoryview` (#126013)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Diffstat (limited to 'Objects')
-rw-r--r--Objects/memoryobject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c
index a2472d4..d4672e8 100644
--- a/Objects/memoryobject.c
+++ b/Objects/memoryobject.c
@@ -3286,6 +3286,7 @@ static PyMethodDef memory_methods[] = {
MEMORYVIEW__FROM_FLAGS_METHODDEF
{"__enter__", memory_enter, METH_NOARGS, NULL},
{"__exit__", memory_exit, METH_VARARGS, memory_exit_doc},
+ {"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")},
{NULL, NULL}
};