Original file line numberDiff line numberDiff line change@@ -31,7 +31,7 @@ two types exist -- :ref:`GenericAlias <types-genericalias>` and
3131 static PyMethodDef my_obj_methods[] = {
3232 // Other methods.
3333 ...
34- {"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, "See PEP 585"}
34+ {"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, "my_obj is generic over its contained type"}
3535 ...
3636 }
3737Original file line numberDiff line numberDiff line change@@ -121,6 +121,8 @@ The module defines the following type:
121121:exc:`TypeError` is raised. Array objects also implement the buffer interface,
122122 and may be used wherever :term:`bytes-like objects <bytes-like object>` are supported.
123123124+ Arrays are :ref:`generic <generics>` over the type of their contents.
125+124126 .. audit-event:: array.__new__ typecode,initializer array.array
125127126128Original file line numberDiff line numberDiff line change@@ -101,6 +101,8 @@ Future Object
101101 implementations can inject their own optimized implementations
102102 of a Future object.
103103104+ Futures are :ref:`generic <generics>` over the type of their results.
105+104106 .. versionchanged:: 3.7
105107 Added support for the :mod:`contextvars` module.
106108Original file line numberDiff line numberDiff line change@@ -1230,6 +1230,9 @@ Task object
12301230 blocks. If the coroutine returns or raises without blocking, the task
12311231 will be finished eagerly and will skip scheduling to the event loop.
123212321233+ Tasks are :ref:`generic <generics>` over the return type of their wrapped
1234+ coroutines.
1235+12331236 .. versionchanged:: 3.7
12341237 Added support for the :mod:`contextvars` module.
12351238Original file line numberDiff line numberDiff line change@@ -484,6 +484,8 @@ or subtracting from an empty counter.
484484 Unix. They are also useful for tracking transactions and other pools of data
485485 where only the most recent activity is of interest.
486486487+ Deques are :ref:`generic <generics>` over the type of their contents.
488+487489488490 Deque objects support the following methods:
489491@@ -739,6 +741,9 @@ stack manipulations such as ``dup``, ``drop``, ``swap``, ``over``, ``pick``,
739741 as if they were passed to the :class:`dict` constructor, including keyword
740742 arguments.
741743744+:class:`!defaultdict`\s are :ref:`generic <generics>` over two types,
745+ signifying (respectively) the types of the dictionary's keys and values.
746+742747743748:class:`defaultdict` objects support the following method in addition to the
744749 standard :class:`dict` operations:
Original file line numberDiff line numberDiff line change@@ -42,6 +42,9 @@ Context Variables
4242 references to context variables which prevents context variables
4343 from being properly garbage collected.
444445+:class:`!ContextVar`\s are :ref:`generic <generics>` over the type of
46+ their contained value.
47+4548 .. attribute:: ContextVar.name
46494750 The name of the variable. This is a read-only property.
@@ -130,6 +133,9 @@ Context Variables
130133 Tokens support the :ref:`context manager protocol <context-managers>`
131134 to automatically reset context variables. See :meth:`ContextVar.set`.
132135136+ Tokens are :ref:`generic <generics>` over the same type as the
137+:class:`ContextVar` which created them.
138+133139 .. versionadded:: 3.14
134140135141 Added support for usage as a context manager.
Original file line numberDiff line numberDiff line change@@ -3177,6 +3177,8 @@ Arrays and pointers
31773177 subscript and slice accesses; for slice reads, the resulting object is
31783178 *not* itself an :class:`Array`.
317931793180+ Arrays are :ref:`generic <generics>` over the type of their elements.
3181+3180318231813183 .. attribute:: _length_
31823184Original file line numberDiff line numberDiff line change@@ -984,6 +984,9 @@ their subgroups based on the types of the contained exceptions.
984984 raises a :exc:`TypeError` if any contained exception is not an
985985:exc:`Exception` subclass.
986986987+ Exception groups are :ref:`generic <generics>` over the type of their
988+ contained exceptions.
989+987990 .. impl-detail::
988991989992 The ``excs`` parameter may be any sequence, but lists and tuples are
Original file line numberDiff line numberDiff line change@@ -2994,6 +2994,9 @@ features:
29942994 To be directly usable as a :term:`path-like object`, ``os.DirEntry``
29952995 implements the :class:`PathLike` interface.
299629962997+:class:`!DirEntry` objects are :ref:`generic <generics>` over the type of the
2998+ path (:class:`str` or :class:`bytes`).
2999+29973000 Attributes and methods on a ``os.DirEntry`` instance are as follows:
2998300129993002 .. attribute:: name
Original file line numberDiff line numberDiff line change@@ -76,6 +76,8 @@ The :mod:`!queue` module defines the following classes and exceptions:
7676 Constructor for an unbounded :abbr:`FIFO(first-in, first-out)` queue.
7777 Simple queues lack advanced functionality such as task tracking.
787879+ Simple queues are :ref:`generic <generics>` over the type of their items.
80+7981 .. versionadded:: 3.7
80828183