Skip to content

Glossary: Software Design Patterns

defaultdict

Also written: collections.defaultdict

A dict that creates a default value, such as an empty list, the first time you use a new key. `EventBus` uses it so a new event name starts with no listeners.

Where the book teaches it

Related terms

Observer