We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e12030 commit 0febb80Copy full SHA for 0febb80
Doc/reference/compound_stmts.rst
@@ -1098,6 +1098,11 @@ The same keyword should not be repeated in class patterns.
1098
The following is the logical flow for matching a class pattern against a
1099
subject value:
1100
1101
+#. If ``name_or_attr`` is a union type, apply the subsequent steps in order to
1102
+ each of its members, returning the first successful match or raising the first
1103
+ encountered exception.
1104
+ This mirrors the behavior of :func:`isinstance` with union types.
1105
+
1106
#. If ``name_or_attr`` is not an instance of the builtin :class:`type` , raise
1107
:exc:`TypeError`.
1108
0 commit comments