Skip to content
Merged
Prev Previous commit
Next Next commit
Add comment
  • Loading branch information
AlexWaygood committed May 16, 2023
commit e114fe95049ef27f36774fbc9d17436b4a9343fd
1 change: 1 addition & 0 deletions Lib/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1805,6 +1805,7 @@ def __instancecheck__(cls, instance):
return True

if is_protocol_cls:
# Fast path for protocols with only callable members
if cls.__callable_proto_members_only__ and issubclass(type(instance), cls):
return True

Expand Down