aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/whatsnew/3.10.rst')
-rw-r--r--Doc/whatsnew/3.10.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index fa8b6aa54fe..96892ba3d37 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -193,7 +193,13 @@ Type hints can now be written in a more succinct manner::
return number ** 2
-See :pep:`604` for more details.
+This new syntax is also accepted as the second argument to :func:`isinstance`
+and :func:`issubclass`::
+
+ >>> isinstance(1, int | str)
+ True
+
+See :ref:`types-union` and :pep:`604` for more details.
(Contributed by Maggie Moss and Philippe Prados in :issue:`41428`.)