defaultdict_fromkey
![Inheritance diagram of defaultdict_fromkey](../../_images/inheritance-1641e963e49e080ba0eebbfe0bea8b08077e365e.png)
- class defaultdict_fromkey[source]
Creates a dictionary with a default_factory function that creates new elements using key as argument.
- Usagenew_dict = defaultdict_fromkey(method)
where method like (lambda key: return new_obj(key))
Each time that new_dict[key] is called with a key that doesn’t exist, method(key) is used to create the value Copied from PyAlarm device server
Import from
taurus.core.util.containers
as:from taurus.core.util.containers import defaultdict_fromkey