iterable

lsst.daf.butler.core.utils.iterable(a)

Make input iterable.

There are three cases, when the input is:

  • iterable, but not a str -> iterate over elements (e.g. [i for i in a])

  • a str -> return single element iterable (e.g. [a])

  • not iterable -> return single elment iterable (e.g. [a]).

Parameters
aiterable or str or not iterable

Argument to be converted to an iterable.

Returns
igenerator

Iterable version of the input value.