parameters: (obj, isinstance=isinstance, StringTypes=StringTypes, 
              SequenceTypes=SequenceTypes, do_flatten=do_flatten)
return_statement: return result
docstring: Flatten a sequence to a non-nested list.
  
      Flatten() converts either a single scalar or a nested sequence
      to a non-nested list. Note that flatten() considers strings
      to be scalars instead of sequences like Python would.
docstring_summary: Flatten a sequence to a non-nested list.
docstring_tokens: Flatten a sequence to a non - nested list .
function: def flatten(obj, isinstance=isinstance, StringTypes=StringTypes, 
              SequenceTypes=SequenceTypes, do_flatten=do_flatten):
      """Flatten a sequence to a non-nested list.
  
      Flatten() converts either a single scalar or a nested sequence
      to a non-nested list. Note that flatten() considers strings
      to be scalars instead of sequences like Python would.
      """
      if isinstance(obj, StringTypes) or not isinstance(obj, SequenceTypes):
          return [obj]
      result = []
      for item in obj:
          if isinstance(item, StringTypes) or not isinstance(item, SequenceTypes):
              result.append(item)
          else:
              do_flatten(item, result)
      return result
function_tokens: def flatten ( obj , isinstance = isinstance , StringTypes = StringTypes , SequenceTypes = SequenceTypes , do_flatten = do_flatten ) : if isinstance ( obj , StringTypes ) or not isinstance ( obj , SequenceTypes ) : return [ obj ] result = [ ] for item in obj : if isinstance ( item , StringTypes ) or not isinstance ( item , SequenceTypes ) : result . append ( item ) else : do_flatten ( item , result ) return result