Return True if the line number is in the frame's code object.
(self, lineno, frame)
| 489 | return False |
| 490 | |
| 491 | def _lineno_in_frame(self, lineno, frame): |
| 492 | """Return True if the line number is in the frame's code object. |
| 493 | """ |
| 494 | code = frame.f_code |
| 495 | if lineno < code.co_firstlineno: |
| 496 | return False |
| 497 | if code not in self.code_linenos: |
| 498 | self.code_linenos[code] = set(lineno for _, _, lineno in code.co_lines()) |
| 499 | return lineno in self.code_linenos[code] |
| 500 | |
| 501 | # Derived classes should override the user_* methods |
| 502 | # to gain control. |