def assert_iter ( * * kw ) : for name , value in kw . items ( ) : if not isiter ( value ) : raise TypeError ( 'paco: {} must be an iterable object' . format ( name ) )
python assert is iterable
Asserts if a given values implements a valid iterable interface .
def assert_iter(**kw):
    """
    Asserts if a given values implements a valid iterable interface.

    Arguments:
        **kw (mixed): value to check if it is an iterable.

    Raises:
        TypeError: if assertion fails.
    """
    for name, value in kw.items():
        if not isiter(value):
            raise TypeError(
                'paco: {} must be an iterable object'.format(name))