From df5c64e247d3a9958520e7c90f9c37577f3b00b1 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 19 Jul 2016 16:58:15 -0700 Subject: [PATCH] Add StopAsyncIteration; also add StopIteration.value. --- stdlib/3/builtins.pyi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stdlib/3/builtins.pyi b/stdlib/3/builtins.pyi index 37ec77bf2..473c7eed2 100644 --- a/stdlib/3/builtins.pyi +++ b/stdlib/3/builtins.pyi @@ -8,6 +8,7 @@ from typing import ( ) from abc import abstractmethod, ABCMeta from types import TracebackType +import sys # Note that names imported above are not automatically made visible via the # implicit builtins import. @@ -804,7 +805,11 @@ class TimeoutError(OSError): ... class WindowsError(OSError): ... class OverflowError(ArithmeticError): ... class ReferenceError(Exception): ... -class StopIteration(Exception): ... +class StopIteration(Exception): + value = ... # type: Any +if sys.version_info >= (3, 5): + class StopAsyncIteration(Exception): + value = ... # type: Any class SyntaxError(Exception): msg = ... # type: str lineno = ... # type: int