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

@@ -68,6 +68,8 @@ class type(object):
# implementation seems to be returning a list.
def mro(self) -> List[type]: ...
def __subclasses__(self: _TT) -> List[_TT]: ...
def __instancecheck__(self, instance: Any) -> bool: ...
def __subclasscheck__(self, subclass: type) -> bool: ...
class int(SupportsInt, SupportsFloat, SupportsAbs[int]):
@overload