You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in python/typing#464, issubclass() with runtime protocols that declare non-method attributes is too ambiguous. Therefore it is proposed to prohibit such calls. Note that isinstance() is still fine.
The text was updated successfully, but these errors were encountered:
This updates protocol semantic according to the discussion in python/typing#464:
None should be considered a subtype of an empty protocol
method = None rule should apply only to callable protocol members
issublcass() is prohibited for protocols with non-method members.
Fixes#3906Fixes#3938Fixes#3939
As discussed in python/typing#464,
issubclass()
with runtime protocols that declare non-method attributes is too ambiguous. Therefore it is proposed to prohibit such calls. Note thatisinstance()
is still fine.The text was updated successfully, but these errors were encountered: