MCPcopy Index your code
hub / github.com/python/cpython / _prune_breaks

Method _prune_breaks

Lib/bdb.py:697–708  ·  view source on GitHub ↗

Prune breakpoints for filename:lineno. A list of breakpoints is maintained in the Bdb instance and in the Breakpoint class. If a breakpoint in the Bdb instance no longer exists in the Breakpoint class, then it's removed from the Bdb instance.

(self, filename, lineno)

Source from the content-addressed store, hash-verified

695 self._add_to_breaks(filename, lineno)
696
697 def _prune_breaks(self, filename, lineno):
698 """Prune breakpoints for filename:lineno.
699
700 A list of breakpoints is maintained in the Bdb instance and in
701 the Breakpoint class. If a breakpoint in the Bdb instance no
702 longer exists in the Breakpoint class, then it's removed from the
703 Bdb instance.
704 """
705 if (filename, lineno) not in Breakpoint.bplist:
706 self.breaks[filename].remove(lineno)
707 if not self.breaks[filename]:
708 del self.breaks[filename]
709
710 def clear_break(self, filename, lineno):
711 """Delete breakpoints for filename:lineno.

Callers 2

clear_breakMethod · 0.95
clear_bpbynumberMethod · 0.95

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected