#NEWLINE# def delete_row( self , row ) : #NEWLINE# #INDENT# 'Delete Row (By ID).\n\n        Requires that the given row dictionary contains an ID_FIELD.\n        :param row:\n            A row dictionary to delete.\n        ' #NEWLINE# try : #NEWLINE# #INDENT# id = row [ ID_FIELD ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise WorksheetException ( "Row does not contain '{0}' field. Please delete by index." . format ( ID_FIELD ) ) #NEWLINE# #UNINDENT# entry = self . _get_row_entry_by_id ( id ) #NEWLINE# self . gd_client . DeleteRow ( entry ) #NEWLINE# for ( i , e ) in enumerate ( self . entries ) : #NEWLINE# #INDENT# if ( e . id . text == entry . id . text ) : #NEWLINE# #INDENT# del self . entries [ i ]