Update type of "throw" method of generators to reflect that it can return a value (#1672)

This commit is contained in:
Matthew Wright authored and Jelle Zijlstra committed 2017-10-25 16:54:18 -04:00
1 parent 9a10c74345
commit 0b721b7af5
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -115,7 +115,7 @@ class Generator(Iterator[_T_co], Generic[_T_co, _T_contra, _V_co]):
@abstractmethod
def throw(self, typ: Type[BaseException], val: Optional[BaseException] = None,
# TODO: tb should be TracebackType but that's defined in types
tb: Any = None) -> None: ...
tb: Any = None) -> _T_co: ...
@abstractmethod
def close(self) -> None: ...