Return a string with information about the breakpoint. The information includes the breakpoint number, temporary status, file:line position, break condition, number of times to ignore, and number of times hit.
(self)
| 740 | print(self.bpformat(), file=out) |
| 741 | |
| 742 | def bpformat(self): |
| 743 | """Return a string with information about the breakpoint. |
| 744 | |
| 745 | The information includes the breakpoint number, temporary |
| 746 | status, file:line position, break condition, number of times to |
| 747 | ignore, and number of times hit. |
| 748 | |
| 749 | """ |
| 750 | if self.temporary: |
| 751 | disp = 'del ' |
| 752 | else: |
| 753 | disp = 'keep ' |
| 754 | if self.enabled: |
| 755 | disp = disp + 'yes ' |
| 756 | else: |
| 757 | disp = disp + 'no ' |
| 758 | ret = '%-4dbreakpoint %s at %s:%d' % (self.number, disp, |
| 759 | self.file, self.line) |
| 760 | if self.cond: |
| 761 | ret += '\n\tstop only if %s' % (self.cond,) |
| 762 | if self.ignore: |
| 763 | ret += '\n\tignore next %d hits' % (self.ignore,) |
| 764 | if self.hits: |
| 765 | if self.hits > 1: |
| 766 | ss = 's' |
| 767 | else: |
| 768 | ss = '' |
| 769 | ret += '\n\tbreakpoint already hit %d time%s' % (self.hits, ss) |
| 770 | return ret |
| 771 | |
| 772 | def __str__(self): |
| 773 | "Return a condensed description of the breakpoint." |