skoot.utils.is_iterable

skoot.utils.is_iterable(x)[source][source]

Determine whether an element is iterable.

This function determines whether an element is iterable by checking for the __iter__ attribute. Since Python 3.x adds the __iter__ attribute to strings, we also have to make sure the input is not a string or unicode type.

Parameters:

x : object

The object or primitive to test whether or not is an iterable.