def _cnfmerge(cnfs):
 if (type(cnfs) is DictionaryType):
  return cnfs
 elif (type(cnfs) in (NoneType, StringType)):
  return cnfs
 else:
  cnf = {}
  for c in _flatten(cnfs):
   try:
    cnf.update(c)
   except (AttributeError, TypeError) as msg:
    print '_cnfmerge: fallback due to:', msg
    for (k, v) in c.items():
     cnf[k] = v
  return cnf

def _cnfmerge ( cnfs ) : if ( type ( cnfs ) is DictionaryType ) : return cnfs elif ( type ( cnfs ) in ( NoneType , StringType ) ) : return cnfs else : cnf = { } for c in _flatten ( cnfs ) : try : cnf . update ( c ) except ( AttributeError , TypeError ) as msg : print '_cnfmerge: fallback due to:' , msg for ( k , v ) in c . items ( ) : cnf [ k ] = v return cnf
internal function .