Introduce explicit __str__ and __repr__ for Exceptions (#3247)

This commit is contained in:
sinancepel
2019-09-23 09:25:49 -07:00
committed by Sebastian Rittau
parent c879ff05aa
commit 01b7002a89
2 changed files with 4 additions and 0 deletions

View File

@@ -1475,6 +1475,8 @@ class BaseException(object):
__suppress_context__: bool
__traceback__: Optional[TracebackType]
def __init__(self, *args: object) -> None: ...
def __str__(self) -> str: ...
def __repr__(self) -> str: ...
if sys.version_info < (3,):
def __getitem__(self, i: int) -> Any: ...
def __getslice__(self, start: int, stop: int) -> Tuple[Any, ...]: ...