xsdata.utils.collections module¶
-
xsdata.utils.collections.
unique_sequence
(items, key=None)[source]¶ Return a new list with the unique values from the sequence.
Optionally you can also provide a lambda to generate the unique key of each item in the sequence.
-
xsdata.utils.collections.
remove
(items, predicate)[source]¶ Return a new list without the items that match the predicate.
-
xsdata.utils.collections.
group_by
(items, key)[source]¶ Group the items of a sequence by the result of the callable.
-
xsdata.utils.collections.
apply
(items, func)[source]¶ Apply the given function to each item of the sequence.
-
xsdata.utils.collections.
find
(items, value)[source]¶ Return the index of the value in the given sequence without raising exception in case of failure.