From f9d868986d98a788bb085f4723401e0084d09548 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Wed, 22 Dec 2021 22:05:20 +0300 Subject: [PATCH 1/2] Start over --- Doc/library/typing.rst | 2 +- .../next/Documentation/2021-12-21-12-45-57.bpo-46120.PE0DmJ.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Documentation/2021-12-21-12-45-57.bpo-46120.PE0DmJ.rst diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 727941b57b547b..08b59d84246f8d 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -625,7 +625,7 @@ These can be used as types in annotations using ``[]``, each having a unique syn Union type; ``Union[X, Y]`` is equivalent to ``X | Y`` and means either X or Y. - To define a union, use e.g. ``Union[int, str]`` or the shorthand ``int | str``. Details: + To define a union, use e.g. ``Union[int, str]`` or the shorthand ``int | str``. Using that shorthand is recommended. Details: * The arguments must be types and there must be at least one. diff --git a/Misc/NEWS.d/next/Documentation/2021-12-21-12-45-57.bpo-46120.PE0DmJ.rst b/Misc/NEWS.d/next/Documentation/2021-12-21-12-45-57.bpo-46120.PE0DmJ.rst new file mode 100644 index 00000000000000..bd3b7b489fb1e5 --- /dev/null +++ b/Misc/NEWS.d/next/Documentation/2021-12-21-12-45-57.bpo-46120.PE0DmJ.rst @@ -0,0 +1 @@ +State that ``|`` is preferred for readability over ``Union`` in the docs. From fd24598feae9759e4798ea6c6a0483ba55b3c278 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 24 Dec 2021 10:55:41 -0800 Subject: [PATCH 2/2] Update Misc/NEWS.d/next/Documentation/2021-12-21-12-45-57.bpo-46120.PE0DmJ.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Éric --- .../next/Documentation/2021-12-21-12-45-57.bpo-46120.PE0DmJ.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Documentation/2021-12-21-12-45-57.bpo-46120.PE0DmJ.rst b/Misc/NEWS.d/next/Documentation/2021-12-21-12-45-57.bpo-46120.PE0DmJ.rst index bd3b7b489fb1e5..17f67472e2ab02 100644 --- a/Misc/NEWS.d/next/Documentation/2021-12-21-12-45-57.bpo-46120.PE0DmJ.rst +++ b/Misc/NEWS.d/next/Documentation/2021-12-21-12-45-57.bpo-46120.PE0DmJ.rst @@ -1 +1 @@ -State that ``|`` is preferred for readability over ``Union`` in the docs. +State that ``|`` is preferred for readability over ``Union`` in the :mod:`typing` docs.