Add __annotations__ to Python 3 (#990)

This commit is contained in:
Ivan Levkivskyi
2017-03-13 15:38:38 +01:00
committed by Guido van Rossum
parent eb07fd3c1a
commit 0bf23b3727

View File

@@ -35,6 +35,8 @@ class object:
__dict__ = ... # type: Dict[str, Any]
__slots__ = ... # type: Optional[Union[str, Iterable[str]]]
__module__ = ... # type: str
if sys.version_info >= (3, 6):
__annotations__ = ... # type: Dict[str, Any]
def __init__(self) -> None: ...
def __new__(cls) -> Any: ...
@@ -552,6 +554,7 @@ class function:
__qualname__ = ... # type: str
__module__ = ... # type: str
__code__ = ... # type: Any
__annotations__ = ... # type: Dict[str, Any]
class list(MutableSequence[_T], Generic[_T]):
@overload