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 a36291d commit 2cb5476Copy full SHA for 2cb5476
Lib/test/test_typing.py
@@ -10669,7 +10669,7 @@ def test_eq(self):
10669
self.assertNotEqual(int, typing._UnionGenericAlias)
10670
10671
def test_hashable(self):
10672
- self.assertIsInstance(hash(typing._UnionGenericAlias), int)
+ self.assertEqual(hash(typing._UnionGenericAlias), hash(Union))
10673
10674
10675
def load_tests(loader, tests, pattern):
Lib/typing.py
@@ -1650,7 +1650,7 @@ def __eq__(self, other):
1650
return NotImplemented
1651
1652
def __hash__(self):
1653
- return super().__hash__()
+ return hash(Union)
1654
1655
1656
class _UnionGenericAlias(metaclass=_UnionGenericAliasMeta):
0 commit comments