'Three possibilities, tried in this order:
clear -> clear all breaks, ask for confirmation
clear file:lineno -> clear all breaks at file:lineno
clear bpno bpno ... -> clear breakpoints by number'

def do_clear(self, arg):

    if (not arg):
        try:
            reply = raw_input('Clear    all    breaks?    ')
        except EOFError:
            reply = 'no'
        reply = reply.strip().lower()
        if (reply in ('y', 'yes')):
            self.clear_all_breaks()
        return
    if (':' in arg):
        i = arg.rfind(':')
        filename = arg[:i]
        arg = arg[(i + 1):]
        try:
            lineno = int(arg)
        except ValueError:
            err = ('Invalid    line    number    (%s)' % arg)
        else:
            err = self.clear_break(filename, lineno)
        if err:
            print >>self.stdout, '***', err
        return
    numberlist = arg.split()
    for i in numberlist:
        try:
            i = int(i)
        except ValueError:
            print >>self.stdout, ('Breakpoint    index    %r    is    not    a    number' % i)
            continue
        if (not (0 <= i < len(bdb.Breakpoint.bpbynumber))):
            print >>self.stdout, 'No    breakpoint    numbered', i
            continue
        err = self.clear_bpbynumber(i)
        if err:
            print >>self.stdout, '***', err
        else:
            print >>self.stdout, 'Deleted    breakpoint', i
