def delete(self, key, time=<NUM_LIT:0>):
if self.do_check_key:<EOL><INDENT>self.check_key(key)<EOL><DEDENT>server, key = self._get_server(key)<EOL>if not server:<EOL><INDENT>return <NUM_LIT:0><EOL><DEDENT>self._statlog('<STR_LIT>')<EOL>if time != None and time != <NUM_LIT:0>:<EOL><INDENT>cmd = "<STR_LIT>" % (key, time)<EOL><DEDENT>else:<EOL><INDENT>cmd = "<STR_LIT>" % key<EOL><DEDENT>try:<EOL><INDENT>server.send_cmd(cmd)<EOL>line = server.readline()<EOL>if line and line.strip() in ['<STR_LIT>', '<STR_LIT>']: return <NUM_LIT:1><EOL>self.debuglog('<STR_LIT>'<EOL>% repr(line))<EOL><DEDENT>except socket.error as msg:<EOL><INDENT>if isinstance(msg, tuple): msg = msg[<NUM_LIT:1>]<EOL>server.mark_dead(msg)<EOL><DEDENT>return <NUM_LIT:0><EOL>
Deletes a key from the memcache.

        @return: Nonzero on success.
        @param time: number of seconds any subsequent set / update commands
        should fail. Defaults to None for no delay.
        @rtype: int