#NEWLINE# def _format_dict( dict ) : #NEWLINE# #INDENT# if ( not dict ) : #NEWLINE# #INDENT# return mark_safe ( '   <small>(<var>empty dict</var>)</small>' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# html = [ ] #NEWLINE# for ( key , value ) in sorted ( dict . iteritems ( ) ) : #NEWLINE# #INDENT# html . append ( _format_dict_item ( key , value ) ) #NEWLINE# #UNINDENT# return mark_safe ( '<br/>' . join ( key ) )