#NEWLINE# def sort( self , cmp = None , key = None , reverse = False ) : #NEWLINE# #INDENT# if ( key is not None ) : #NEWLINE# #INDENT# self . _keys . sort ( key = ( lambda k : key ( ( k , self [ k ] ) ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( cmp is not None ) : #NEWLINE# #INDENT# self . _keys . sort ( ( lambda a , b : cmp ( ( a , self [ a ] ) , ( b , self [ b ] ) ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _keys . sort ( ) #NEWLINE# #UNINDENT# #UNINDENT# if reverse : #NEWLINE# #INDENT# self . _keys . reverse ( )