Skip to content

Commit 7c413c9

Browse files
gwkgvanrossum
authored andcommitted
exit function takes argument of any type. (#1116)
The type annotations for exit were incorrectly limited to int in two places; the others that I looked at are already correct.
1 parent 84371e8 commit 7c413c9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

stdlib/2/__builtin__.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ def dir(o: object = ...) -> List[str]: ...
713713
def divmod(a: int, b: int) -> Tuple[int, int]: ...
714714
@overload
715715
def divmod(a: float, b: float) -> Tuple[float, float]: ...
716-
def exit(code: int = ...) -> NoReturn: ...
716+
def exit(code: Any = ...) -> NoReturn: ...
717717
@overload
718718
def filter(function: Callable[[_T], Any],
719719
iterable: Iterable[_T]) -> List[_T]: ...

stdlib/3/builtins.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ def eval(source: str, globals: Dict[str, Any] = None,
772772
locals: Mapping[str, Any] = None) -> Any: ... # TODO code object as source
773773
def exec(object: str, globals: Dict[str, Any] = None,
774774
locals: Mapping[str, Any] = None) -> Any: ... # TODO code object as source
775-
def exit(code: int = None) -> NoReturn: ...
775+
def exit(code: Any = ...) -> NoReturn: ...
776776
@overload
777777
def filter(function: Callable[[_T], Any], iterable: Iterable[_T]) -> Iterator[_T]: ...
778778
@overload

0 commit comments

Comments
 (0)