def delete(self, key):
        """
        Delete an existing C{key}.

        @param key: the key to delete.
        @type key: L{bytes}

        @return: a deferred that will be called back with C{True} if the key
            was successfully deleted, or C{False} if not.
        @rtype: L{Deferred}
        """
        if self._disconnected:
            return fail(RuntimeError("not connected"))
        if not isinstance(key, bytes):
            return fail(ClientError(
                "Invalid type for key: %s, expecting bytes" % (type(key),)))
        self.sendLine(b"delete " + key)
        cmdObj = Command(b"delete", key=key)
        self._current.append(cmdObj)
        return cmdObj._deferred

        Delete an existing C{key}.

        @param key: the key to delete.
        @type key: L{bytes}

        @return: a deferred that will be called back with C{True} if the key
            was successfully deleted, or C{False} if not.
        @rtype: L{Deferred}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/protocols/memcache.py