From db3cc2e8daab9ed40f72ee1f63e33466fe7427ca Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Sat, 9 Apr 2016 18:32:20 +0200 Subject: [PATCH] Enable typing.DefaultDict as an alias for collections.defaultdict (#139) --- stdlib/2.7/typing.pyi | 2 ++ stdlib/3/typing.pyi | 2 ++ 2 files changed, 4 insertions(+) diff --git a/stdlib/2.7/typing.pyi b/stdlib/2.7/typing.pyi index b9384b917..403bc43fd 100644 --- a/stdlib/2.7/typing.pyi +++ b/stdlib/2.7/typing.pyi @@ -1,6 +1,7 @@ # Stubs for typing (Python 2.7) from abc import abstractmethod, ABCMeta +import collections # Definitions of special type checking related constructs. Their definition # are not used, so their value does not matter. @@ -27,6 +28,7 @@ Union = TypeAlias(object) Optional = TypeAlias(object) List = TypeAlias(object) Dict = TypeAlias(object) +DefaultDict = collections.defaultdict Set = TypeAlias(object) # Predefined type variables. diff --git a/stdlib/3/typing.pyi b/stdlib/3/typing.pyi index a2bcc4350..5435295c3 100644 --- a/stdlib/3/typing.pyi +++ b/stdlib/3/typing.pyi @@ -1,6 +1,7 @@ # Stubs for typing from abc import abstractmethod, ABCMeta +import collections # Definitions of special type checking related constructs. Their definition # are not used, so their value does not matter. @@ -28,6 +29,7 @@ Union = TypeAlias(object) Optional = TypeAlias(object) List = TypeAlias(object) Dict = TypeAlias(object) +DefaultDict = collections.defaultdict Set = TypeAlias(object) # Predefined type variables.