#NEWLINE# def __delitem__( self , key ) : #NEWLINE# #INDENT# val = dict . __getitem__ ( self , key ) #NEWLINE# if ( type ( val ) is list ) : #NEWLINE# #INDENT# del val [ ( - 1 ) ] #NEWLINE# if ( not val ) : #NEWLINE# #INDENT# dict . __delitem__ ( self , key ) #NEWLINE# #UNINDENT# if ( len ( val ) == 1 ) : #NEWLINE# #INDENT# v = val [ 0 ] #NEWLINE# dict . __setitem__ ( self , key , v ) #NEWLINE# #UNINDENT# return #NEWLINE# #UNINDENT# dict . __delitem__ ( self , key )