def is_non_str_iterable(obj): # noinspection PyProtectedMember if isinstance(obj, str) or (isinstance(obj, Promise) and obj._delegate_text): return False return hasattr(obj, '__iter__')