#NEWLINE# @ gen . coroutine #NEWLINE# def delete_doc( self , doc ) : #NEWLINE# #INDENT# 'Delete a document.\n        The `doc` shall be a dict, at least having the keys `_id` and `_rev`.\n        ' #NEWLINE# if ( ( '_rev' not in doc ) or ( '_id' not in doc ) ) : #NEWLINE# #INDENT# raise KeyError ( 'Missing id or revision information in doc' ) #NEWLINE# #UNINDENT# url = '{0}/{1}?rev={2}' . format ( self . db_name , url_escape ( doc [ '_id' ] ) , doc [ '_rev' ] ) #NEWLINE# r = ( yield self . _http_delete ( url ) ) #NEWLINE# raise gen . Return ( r )