Skip to content

Commit f9d8689

Browse files
committed
Start over
1 parent e9a01e2 commit f9d8689

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Doc/library/typing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ These can be used as types in annotations using ``[]``, each having a unique syn
625625

626626
Union type; ``Union[X, Y]`` is equivalent to ``X | Y`` and means either X or Y.
627627

628-
To define a union, use e.g. ``Union[int, str]`` or the shorthand ``int | str``. Details:
628+
To define a union, use e.g. ``Union[int, str]`` or the shorthand ``int | str``. Using that shorthand is recommended. Details:
629629

630630
* The arguments must be types and there must be at least one.
631631

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
State that ``|`` is preferred for readability over ``Union`` in the docs.

0 commit comments

Comments
 (0)