-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
gh-150319: Replace all documentation which says "See PEP 585" #150325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Generic builtin and standard library types now document the meaning of their | ||
| type parameters. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1023,7 +1023,8 @@ static PyMethodDef gen_methods[] = { | |
| {"throw", _PyCFunction_CAST(gen_throw), METH_FASTCALL, throw_doc}, | ||
| {"close", gen_close, METH_NOARGS, close_doc}, | ||
| {"__sizeof__", gen_sizeof, METH_NOARGS, sizeof__doc__}, | ||
| {"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, | ||
| {"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, | ||
| PyDoc_STR("generators are generic over the type of their values")}, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They are actually generic over three type variables (yield, send, and return type). |
||
| {NULL, NULL} /* Sentinel */ | ||
| }; | ||
|
|
||
|
|
@@ -1374,7 +1375,8 @@ static PyMethodDef coro_methods[] = { | |
| {"throw",_PyCFunction_CAST(gen_throw), METH_FASTCALL, coro_throw_doc}, | ||
| {"close", gen_close, METH_NOARGS, coro_close_doc}, | ||
| {"__sizeof__", gen_sizeof, METH_NOARGS, sizeof__doc__}, | ||
| {"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, | ||
| {"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, | ||
| PyDoc_STR("coroutines are generic over the type of their return value")}, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also three typevars: yield, send, and return. (Though in practice the first two are usually given as Any and I'm not sure they have much practical use.) |
||
| {NULL, NULL} /* Sentinel */ | ||
| }; | ||
|
|
||
|
|
@@ -1820,7 +1822,7 @@ static PyMethodDef async_gen_methods[] = { | |
| {"aclose", async_gen_aclose, METH_NOARGS, async_aclose_doc}, | ||
| {"__sizeof__", gen_sizeof, METH_NOARGS, sizeof__doc__}, | ||
| {"__class_getitem__", Py_GenericAlias, | ||
| METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, | ||
| METH_O|METH_CLASS, PyDoc_STR("async generators are generic over the type of their values")}, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Two typevars: yield and send. |
||
| {NULL, NULL} /* Sentinel */ | ||
| }; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Template is actually not generic in typeshed at the moment. There has been some low-level discussion about whether and how they should be generic.