defaultdict(default_factory=None, /, [...]) --> dict with default factory

The default factory is called without arguments to produce a new value when a key is not present, in getitem only. A defaultdict compares equal to a dict with the same items. All remaining arguments are treated the same as if they were passed to the dict constructor, including keyword arguments.

default_factory Factory for default value called by missing().



D.copy() -> a shallow copy of D.


Return self|value.


Return value|self.