colour.utilities.first_item#
- colour.utilities.first_item(a: collections.abc.Iterable) Any [source]#
Return the first item of given iterable.
- Parameters
a (collections.abc.Iterable) – Iterable to get the first item from.
- Return type
- Raises
StopIteration – If the iterable is empty.
Examples
>>> a = range(10) >>> first_item(a) 0