nodes: 0, module; 1, function_definition; 2, function_name:_is_iterable; 3, parameters; 4, block; 5, identifier:val; 6, expression_statement; 7, try_statement; 8, comment:"""Ensure that a value is iterable and not some sort of string"""; 9, block; 10, except_clause; 11, else_clause; 12, expression_statement; 13, tuple; 14, block; 15, block; 16, call; 17, identifier:ValueError; 18, identifier:TypeError; 19, return_statement; 20, return_statement; 21, identifier:iter; 22, argument_list; 23, False; 24, not_operator; 25, identifier:val; 26, call; 27, identifier:isinstance; 28, argument_list; 29, identifier:val; 30, identifier:basestring
code: def _is_iterable(val):
      """Ensure that a value is iterable and not some sort of string"""
      try:
          iter(val)
      except (ValueError, TypeError):
          return False
      else:
          return not isinstance(val, basestring)