def make_formatters(config, stream_openers):
 default_stream_opener = StreamOpener(stream=sys.stdout)
 formatter_list = []
 for (i, name) in enumerate(config.format):
  stream_opener = default_stream_opener
  if (i < len(stream_openers)):
   stream_opener = stream_openers[i]
  formatter_class = select_formatter_class(name)
  formatter_object = formatter_class(stream_opener, config)
  formatter_list.append(formatter_object)
 return formatter_list

def make_formatters ( config , stream_openers ) : default_stream_opener = StreamOpener ( stream = sys . stdout ) formatter_list = [ ] for ( i , name ) in enumerate ( config . format ) : stream_opener = default_stream_opener if ( i < len ( stream_openers ) ) : stream_opener = stream_openers [ i ] formatter_class = select_formatter_class ( name ) formatter_object = formatter_class ( stream_opener , config ) formatter_list . append ( formatter_object ) return formatter_list
build a list of formatter .