lisa.utils.order_as#
- lisa.utils.order_as(items, order_as, key=None)[source]#
Reorder the iterable of
itemsto match the sequence inorder_as. Items present initemsand not inorder_aswill be appended at the end, in appearance order.- Parameters:
key (collections.abc.Callable) – If provided, will be called on each item of
itemsbefore being compared toorder_asto determine the order.