anyconfig.utils.lists
¶
Misc utility routines for anyconfig module.
- anyconfig.utils.lists.groupby(itr, key_fn=None)¶
Provide an wrapper function of itertools.groupby to sort each results.
- Parameters:
itr (
Iterable
[Any
]) – Iterable object, a list/tuple/genrator, etc.key_fn (
Optional
[Callable
[...
,Any
]]) – Key function to sort ‘itr’.
- Return type:
Iterable
[tuple
[Any
,Iterable
[Any
]]]
- anyconfig.utils.lists.concat(xss)¶
Concatenates a list of lists.
- Return type:
list
[Any
]