def _combine_args(first, *rest):
 if (hasattr(first, '__iter__') and (not (isinstance(first, TreeElement) or isinstance(first, type) or isinstance(first, basestring) or isinstance(first, dict)))):
  if rest:
   raise ValueError('Arguments must be either a single list of targets, or separately specified targets (e.g. foo(t1, t2, t3)), but not both.')
  return first
 return itertools.chain([first], rest)

def _combine_args ( first , * rest ) : if ( hasattr ( first , '__iter__' ) and ( not ( isinstance ( first , TreeElement ) or isinstance ( first , type ) or isinstance ( first , basestring ) or isinstance ( first , dict ) ) ) ) : if rest : raise ValueError ( 'Arguments must be either a single list of targets, or separately specified targets (e.g. foo(t1, t2, t3)), but not both.' ) return first return itertools . chain ( [ first ] , rest )
convert [targets] or *targets arguments to a single iterable .