odict_from_list¶
-
tollan.utils.odict_from_list(lst, key)[source]¶ Return an ordered dict from list.
- Parameters
- keystr or callable
The key to use. If str, the items in list shall be dict that contains key
key. If callable, it shall return the key when called with each item.
- Returns
- OrderedDict
The ordered dict constructed from the list.