add __{cause,context,traceback}__ to BaseException, per PEP 3134 (#369)

This commit is contained in:
speezepearson
2016-07-13 15:26:55 -07:00
committed by Matthias Kramm
parent f47ff0b966
commit 534837e1ee

View File

@@ -7,6 +7,7 @@ from typing import (
SupportsAbs, SupportsRound, IO, Union, ItemsView, KeysView, ValuesView, ByteString
)
from abc import abstractmethod, ABCMeta
from types import TracebackType
# Note that names imported above are not automatically made visible via the
# implicit builtins import.
@@ -751,6 +752,9 @@ Ellipsis = ... # type: ellipsis
class BaseException:
args = ... # type: Any
__cause__ = ... # type: BaseException
__context__ = ... # type: BaseException
__traceback__ = ... # type: TracebackType
def __init__(self, *args: Any) -> None: ...
def with_traceback(self, tb: Any) -> BaseException: ...