mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +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 @@ class _ProtocolMeta(ABCMeta):
|
|||
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