From 534837e1ee34341727e3f424923e3aebbfda245e Mon Sep 17 00:00:00 2001 From: speezepearson Date: Wed, 13 Jul 2016 15:26:55 -0700 Subject: [PATCH] add __{cause,context,traceback}__ to BaseException, per PEP 3134 (#369) --- stdlib/3/builtins.pyi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index 291296aed..3188aa7ef 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -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: ...