Add type.__call__. Fix #158. (#159)

This commit is contained in:
Guido van Rossum
2016-04-25 08:22:00 -07:00
committed by Jukka Lehtosalo
parent 25b18ebcc6
commit 79554d6da2
2 changed files with 2 additions and 0 deletions

View File

@@ -53,6 +53,7 @@ class type:
def __new__(cls, o: object) -> type: ...
@overload
def __new__(cls, name: str, bases: Tuple[type, ...], namespace: Dict[str, Any]) -> type: ...
def __call__(self, *args: Any, **kwds: Any) -> Any: ...
class int(SupportsInt, SupportsFloat, SupportsAbs[int]):
@overload

View File

@@ -53,6 +53,7 @@ class type:
def __new__(cls, o: object) -> type: ...
@overload
def __new__(cls, name: str, bases: Tuple[type, ...], namespace: Dict[str, Any]) -> type: ...
def __call__(self, *args: Any, **kwds: Any) -> Any: ...
class int(SupportsInt, SupportsFloat, SupportsAbs[int]):
def __init__(self, x: Union[SupportsInt, str, bytes] = None, base: int = None) -> None: ...