mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-74690: Further optimise typing._ProtocolMeta.__instancecheck__ (#103280)
This commit is contained in:
parent
96e1901a59
commit
de18267685
1 changed files with 1 additions and 1 deletions
|
|
@ -2039,7 +2039,7 @@ def __instancecheck__(cls, instance):
|
|||
val = getattr_static(instance, attr)
|
||||
except AttributeError:
|
||||
break
|
||||
if callable(getattr(cls, attr, None)) and val is None:
|
||||
if val is None and callable(getattr(cls, attr, None)):
|
||||
break
|
||||
else:
|
||||
return True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue