File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Misc/NEWS.d/next/Documentation Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ annotations. These include:
4949 *Introducing * :class: `Protocol ` and the
5050 :func: `@runtime_checkable<runtime_checkable> ` decorator
5151* :pep: `585 `: Type Hinting Generics In Standard Collections
52- *Introducing * the ability to use builtin collections and ABCs as
53- :term : `generic types<generic type > `
52+ *Introducing * :class: ` types.GenericAlias ` and the ability to use standard
53+ library classes as :ref : `generic types<types-genericalias > `
5454* :pep: `586 `: Literal Types
5555 *Introducing * :data: `Literal `
5656* :pep: `589 `: TypedDict: Type Hints for Dictionaries with a Fixed Set of Keys
@@ -291,8 +291,8 @@ A user-defined class can be defined as a generic class.
291291single type parameter ``T `` . This also makes ``T `` valid as a type within the
292292class body.
293293
294- The :class: `Generic ` base class defines :meth: `__class_getitem__ ` so that
295- ``LoggedVar[t] `` is valid as a type::
294+ The :class: `Generic ` base class defines :meth: `~object. __class_getitem__ ` so
295+ that ``LoggedVar[t] `` is valid as a type::
296296
297297 from collections.abc import Iterable
298298
Original file line number Diff line number Diff line change 1+ Amend the docs on ``GenericAlias `` objects to clarify that non-container
2+ classes can also implement ``__class_getitem__ ``. Patch contributed by Alex
3+ Waygood.
You can’t perform that action at this time.
0 commit comments