def always_iterable(item):
 if (isinstance(item, six.string_types) or (not hasattr(item, '__iter__'))):
  item = (item,)
 return item

def always_iterable ( item ) : if ( isinstance ( item , six . string_types ) or ( not hasattr ( item , '__iter__' ) ) ) : item = ( item , ) return item
given an object .