Enable typing.DefaultDict as an alias for collections.defaultdict (#139)

This commit is contained in:
Ivan Levkivskyi
2016-04-09 18:32:20 +02:00
committed by Guido van Rossum
parent 5f76369093
commit db3cc2e8da
2 changed files with 4 additions and 0 deletions

View File

@@ -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.

View File

@@ -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.