#NEWLINE# def flatten_dictionaries( input ) : #NEWLINE# #INDENT# " Flatten a list of dictionaries into a single dictionary, to allow flexible YAML use\n      Dictionary comprehensions can do this, but would like to allow for pre-Python 2.7 use\n      If input isn't a list, just return it.... " #NEWLINE# output = dict ( ) #NEWLINE# if isinstance ( input , list ) : #NEWLINE# #INDENT# for map in input : #NEWLINE# #INDENT# output . update ( map ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# output = input #NEWLINE# #UNINDENT# return output