gmdkit.utils package
Submodules
gmdkit.utils.enums module
gmdkit.utils.misc module
- join_digit_list(digit_list, leading_digit=1)[source]
- Parameters:
leading_digit (Literal[1, 2, 3, 4, 5, 6, 7, 8, 9])
- next_free(values, start=None, vmin=-2147483648, vmax=2147483647, count=1)[source]
Returns the next unused integer from a list, within the given limits. Negative numbers are returned counting down from -1.
- Parameters:
values (Iterable[int]) – Currently used values.
start (int, optional) – The current next free value, used to speed up iterative searches over large lists. Defaults to 0.
vmin (int, optional) – The minimum value that can be returned. Defaults to -inf.
vmax (int, optional) – The maximum value that can be returned. Defaults to inf.
count (int, optional) – The number of values to return. Defaults to 1.
- Returns:
new_ids – A list of ids returned.
- Return type:
list[int]