def _repr_pairs(dump, tag, sequence, flow_style=None):
 import yaml
 value = []
 node = yaml.SequenceNode(tag, value, flow_style=flow_style)
 if (dump.alias_key is not None):
  dump.represented_objects[dump.alias_key] = node
 best_style = True
 for (key, val) in sequence:
  item = dump.represent_data({key: val})
  if (not (isinstance(item, yaml.ScalarNode) and (not item.style))):
   best_style = False
  value.append(item)
 if (flow_style is None):
  if (dump.default_flow_style is not None):
   node.flow_style = dump.default_flow_style
  else:
   node.flow_style = best_style
 return node

def _repr_pairs ( dump , tag , sequence , flow_style = None ) : import yaml value = [ ] node = yaml . SequenceNode ( tag , value , flow_style = flow_style ) if ( dump . alias_key is not None ) : dump . represented_objects [ dump . alias_key ] = node best_style = True for ( key , val ) in sequence : item = dump . represent_data ( { key : val } ) if ( not ( isinstance ( item , yaml . ScalarNode ) and ( not item . style ) ) ) : best_style = False value . append ( item ) if ( flow_style is None ) : if ( dump . default_flow_style is not None ) : node . flow_style = dump . default_flow_style else : node . flow_style = best_style return node
this is the same code as baserepresenter .