mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
gh-91603: Speed up isinstance/issubclass on union types (GH-91631)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
This commit is contained in:
parent
4ed3900041
commit
0ef8d921f5
7 changed files with 24 additions and 79 deletions
|
@ -225,7 +225,7 @@ class TestIsInstanceIsSubclass(unittest.TestCase):
|
|||
with self.assertRaises(TypeError):
|
||||
isinstance(2, list[int] | int)
|
||||
with self.assertRaises(TypeError):
|
||||
isinstance(2, int | str | list[int] | float)
|
||||
isinstance(2, float | str | list[int] | int)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue