#NEWLINE# def push( self , kv ) : #NEWLINE# #INDENT# ' Adds a new item from the given (key, value)-tuple.\n            If the key exists, pushes the updated item to the head of the dict.\n        ' #NEWLINE# if ( kv [ 0 ] in self ) : #NEWLINE# #INDENT# self . __delitem__ ( self [ 0 ] ) #NEWLINE# #UNINDENT# self . __setitem__ ( kv [ 0 ] , kv [ 1 ] )