'If a list has less than 4 items, represent it in inline style
(i.e. comma separated, within square brackets).'

def represent_list(self, data):

    node = super(Dumper, self).represent_list(data)
    length = len(data)
    if ((self.default_flow_style is None) and (length < 4)):
        node.flow_style = True
    elif (self.default_flow_style is None):
        node.flow_style = False
    return node
