[Python-checkins] peps: Add DefaultDict to PEP 484.

guido.van.rossum python-checkins at python.org
Tue Apr 5 12:16:11 EDT 2016


https://hg.python.org/peps/rev/7a4e2b94b631
changeset:   6276:7a4e2b94b631
user:        Guido van Rossum <guido at python.org>
date:        Tue Apr 05 09:16:06 2016 -0700
summary:
  Add DefaultDict to PEP 484.

files:
  pep-0484.txt |  11 +++++++----
  1 files changed, 7 insertions(+), 4 deletions(-)


diff --git a/pep-0484.txt b/pep-0484.txt
--- a/pep-0484.txt
+++ b/pep-0484.txt
@@ -1337,6 +1337,9 @@
 
 * Dict, used as ``Dict[key_type, value_type]``
 
+* DefaultDict, used as ``DefaultDict[key_type, value_type]``,
+  a generic variant of ``collections.defaultdict``
+
 * List, used as ``List[element_type]``
 
 * Set, used as ``Set[element_type]``. See remark for ``AbstractSet``
@@ -1344,10 +1347,10 @@
 
 * FrozenSet, used as ``FrozenSet[element_type]``
 
-Note: ``Dict``, ``List``, ``Set`` and ``FrozenSet`` are mainly useful
-for annotating return values.  For arguments, prefer the abstract
-collection types defined below, e.g.  ``Mapping``, ``Sequence`` or
-``AbstractSet``.
+Note: ``Dict``, ``DefaultDict``, ``List``, ``Set`` and ``FrozenSet``
+are mainly useful for annotating return values.
+For arguments, prefer the abstract collection types defined below,
+e.g.  ``Mapping``, ``Sequence`` or ``AbstractSet``.
 
 Generic variants of container ABCs (and a few non-containers):
 

-- 
Repository URL: https://hg.python.org/peps


More information about the Python-checkins mailing list