Skip to content

Commit 3bf0d02

Browse files
bpo-42198: New section in stdtypes for type annotation types (GH-23063)
1 parent 02cdfc9 commit 3bf0d02

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

Doc/library/stdtypes.rst

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4764,10 +4764,20 @@ Compared to the overhead of setting up the runtime context, the overhead of a
47644764
single class dictionary lookup is negligible.
47654765

47664766

4767+
Type Annotation Types --- :ref:`Generic Alias <types-genericalias>`, :ref:`Union <types-union>`
4768+
===============================================================================================
4769+
4770+
.. index::
4771+
single: annotation; type annotation; type hint
4772+
4773+
The core built-in types for :term:`type annotations <annotation>` are
4774+
:ref:`Generic Alias <types-genericalias>` and :ref:`Union <types-union>`.
4775+
4776+
47674777
.. _types-genericalias:
47684778

47694779
Generic Alias Type
4770-
==================
4780+
------------------
47714781

47724782
.. index::
47734783
object: GenericAlias
@@ -4870,7 +4880,7 @@ in the ``GenericAlias`` object's :attr:`__args__ <genericalias.__args__>`. ::
48704880

48714881

48724882
Standard Generic Collections
4873-
----------------------------
4883+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48744884

48754885
These standard library collections support parameterized generics.
48764886

@@ -4915,7 +4925,7 @@ These standard library collections support parameterized generics.
49154925

49164926

49174927
Special Attributes of Generic Alias
4918-
-----------------------------------
4928+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49194929

49204930
All parameterized generics implement special read-only attributes.
49214931

@@ -4961,7 +4971,7 @@ All parameterized generics implement special read-only attributes.
49614971
.. _types-union:
49624972

49634973
Union Type
4964-
==========
4974+
----------
49654975

49664976
.. index::
49674977
object: Union

0 commit comments

Comments
 (0)