Added __instancecheck__ and __subclasscheck__ to type (#887)

This commit is contained in:
Andrey Vlasovskikh
2017-01-29 22:17:01 +03:00
committed by Guido van Rossum
parent 8ce64ce782
commit bb33cb0119
2 changed files with 4 additions and 0 deletions

View File

@@ -72,6 +72,8 @@ class type:
# Note: the documentation doesnt specify what the return type is, the standard
# implementation seems to be returning a list.
def mro(self) -> List[type]: ...
def __instancecheck__(self, instance: Any) -> bool: ...
def __subclasscheck__(self, subclass: type) -> bool: ...
class super(object):
@overload