summaryrefslogtreecommitdiffstats
path: root/Lib/typing.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/typing.py')
-rw-r--r--Lib/typing.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/typing.py b/Lib/typing.py
index 1823cb8..508f4b6 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -1181,7 +1181,7 @@ class _UnionGenericAlias(_GenericAlias, _root=True):
return Union[params]
def __eq__(self, other):
- if not isinstance(other, _UnionGenericAlias):
+ if not isinstance(other, (_UnionGenericAlias, types.Union)):
return NotImplemented
return set(self.__args__) == set(other.__args__)