diff options
author | Ethan Smith <ethan@ethanhs.me> | 2020-04-10 04:25:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-10 04:25:53 (GMT) |
commit | 7c4185d62d4aec486d82c3ad02acd878db2d3537 (patch) | |
tree | d74318ca0c3e092652e64b9fe174edc0bcef9586 /Objects | |
parent | 2fa67df605e4b0803e7e3aac0b85d851b4b4e09a (diff) | |
download | cpython-7c4185d62d4aec486d82c3ad02acd878db2d3537.zip cpython-7c4185d62d4aec486d82c3ad02acd878db2d3537.tar.gz cpython-7c4185d62d4aec486d82c3ad02acd878db2d3537.tar.bz2 |
bpo-39481: PEP 585 for enumerate, AsyncGeneratorType, mmap (GH-19421)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/enumobject.c | 2 | ||||
-rw-r--r-- | Objects/genobject.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Objects/enumobject.c b/Objects/enumobject.c index 75703be..4a83bb4 100644 --- a/Objects/enumobject.c +++ b/Objects/enumobject.c @@ -201,6 +201,8 @@ PyDoc_STRVAR(reduce_doc, "Return state information for pickling."); static PyMethodDef enum_methods[] = { {"__reduce__", (PyCFunction)enum_reduce, METH_NOARGS, reduce_doc}, + {"__class_getitem__", (PyCFunction)Py_GenericAlias, + METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, {NULL, NULL} /* sentinel */ }; diff --git a/Objects/genobject.c b/Objects/genobject.c index 6bb08ae..d3455f8 100644 --- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -1346,6 +1346,8 @@ static PyMethodDef async_gen_methods[] = { {"asend", (PyCFunction)async_gen_asend, METH_O, async_asend_doc}, {"athrow",(PyCFunction)async_gen_athrow, METH_VARARGS, async_athrow_doc}, {"aclose", (PyCFunction)async_gen_aclose, METH_NOARGS, async_aclose_doc}, + {"__class_getitem__", (PyCFunction)Py_GenericAlias, + METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, {NULL, NULL} /* Sentinel */ }; |