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 * :class: `Literal `
5656* :pep: `589 `: TypedDict: Type Hints for Dictionaries with a Fixed Set of Keys
@@ -258,8 +258,8 @@ A user-defined class can be defined as a generic class.
258258single type parameter ``T `` . This also makes ``T `` valid as a type within the
259259class body.
260260
261- The :class: `Generic ` base class defines :meth: `__class_getitem__ ` so that
262- ``LoggedVar[t] `` is valid as a type::
261+ The :class: `Generic ` base class defines :meth: `~object. __class_getitem__ ` so
262+ that ``LoggedVar[t] `` is valid as a type::
263263
264264 from collections.abc import Iterable
265265
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