colour.utilities.first_item#

colour.utilities.first_item(a: Iterable) Any[source]#

Return the first item of given iterable.

Parameters:

a (Iterable) – Iterable to get the first item from.

Return type:

object

Raises:

StopIteration – If the iterable is empty.

Examples

>>> a = range(10)
>>> first_item(a)
0