(self, arg)
cl(ear) filename:lineno\ncl(ear) [bpnumber [bpnumber...]]
        With a space separated list of breakpoint numbers, clear
        those breakpoints.  Without argument, clear all breaks (but
        first ask confirmation).  With a filename:lineno argument,
        clear all breaks at that line in that file.
cl(ear) filename:lineno\ncl(ear) [bpnumber [bpnumber...]]
        With a space separated list of breakpoint numbers, clear
        those breakpoints.  Without argument, clear all breaks (but
        first ask confirmation).  With a filename:lineno argument,
        clear all breaks at that line in that file.
cl ( ear ) filename : lineno \ ncl ( ear ) [ bpnumber [ bpnumber ... ]] With a space separated list of breakpoint numbers clear those breakpoints . Without argument clear all breaks ( but first ask confirmation ) . With a filename : lineno argument clear all breaks at that line in that file .
def do_clear(self, arg):
        """cl(ear) filename:lineno\ncl(ear) [bpnumber [bpnumber...]]
        With a space separated list of breakpoint numbers, clear
        those breakpoints.  Without argument, clear all breaks (but
        first ask confirmation).  With a filename:lineno argument,
        clear all breaks at that line in that file.
        """
        if not arg:
            try:
                reply = input('Clear all breaks? ')
            except EOFError:
                reply = 'no'
            reply = reply.strip().lower()
            if reply in ('y', 'yes'):
                bplist = [bp for bp in bdb.Breakpoint.bpbynumber if bp]
                self.clear_all_breaks()
                for bp in bplist:
                    self.message('Deleted %s' % bp)
            return
        if ':' in arg:
            # Make sure it works for "clear C:\foo\bar.py:12"
            i = arg.rfind(':')
            filename = arg[:i]
            arg = arg[i+1:]
            try:
                lineno = int(arg)
            except ValueError:
                err = "Invalid line number (%s)" % arg
            else:
                bplist = self.get_breaks(filename, lineno)[:]
                err = self.clear_break(filename, lineno)
            if err:
                self.error(err)
            else:
                for bp in bplist:
                    self.message('Deleted %s' % bp)
            return
        numberlist = arg.split()
        for i in numberlist:
            try:
                bp = self.get_bpbynumber(i)
            except ValueError as err:
                self.error(err)
            else:
                self.clear_bpbynumber(i)
                self.message('Deleted %s' % bp)
def do_clear ( self , arg ) : if not arg : try : reply = input ( 'Clear all breaks? ' ) except EOFError : reply = 'no' reply = reply . strip ( ) . lower ( ) if reply in ( 'y' , 'yes' ) : bplist = [ bp for bp in bdb . Breakpoint . bpbynumber if bp ] self . clear_all_breaks ( ) for bp in bplist : self . message ( 'Deleted %s' % bp ) return if ':' in arg : # Make sure it works for "clear C:\foo\bar.py:12" i = arg . rfind ( ':' ) filename = arg [ : i ] arg = arg [ i + 1 : ] try : lineno = int ( arg ) except ValueError : err = "Invalid line number (%s)" % arg else : bplist = self . get_breaks ( filename , lineno ) [ : ] err = self . clear_break ( filename , lineno ) if err : self . error ( err ) else : for bp in bplist : self . message ( 'Deleted %s' % bp ) return numberlist = arg . split ( ) for i in numberlist : try : bp = self . get_bpbynumber ( i ) except ValueError as err : self . error ( err ) else : self . clear_bpbynumber ( i ) self . message ( 'Deleted %s' % bp )