" Accessing f_local of current frame reset the namespace, so we want to avoid that or the following can happen ipdb> foo "old" ipdb> foo = "new" ipdb> foo "new" ipdb> where ipdb> foo "old" So if frame is self.
(self, frame)
| 647 | super()._pdbcmd_print_frame_status(arg) # type: ignore[misc] |
| 648 | |
| 649 | def _get_frame_locals(self, frame): |
| 650 | """ " |
| 651 | Accessing f_local of current frame reset the namespace, so we want to avoid |
| 652 | that or the following can happen |
| 653 | |
| 654 | ipdb> foo |
| 655 | "old" |
| 656 | ipdb> foo = "new" |
| 657 | ipdb> foo |
| 658 | "new" |
| 659 | ipdb> where |
| 660 | ipdb> foo |
| 661 | "old" |
| 662 | |
| 663 | So if frame is self.current_frame we instead return self.curframe_locals |
| 664 | |
| 665 | """ |
| 666 | if frame is self.curframe: |
| 667 | return self.curframe_locals |
| 668 | else: |
| 669 | return frame.f_locals |
| 670 | |
| 671 | def format_stack_entry( |
| 672 | self, |
no outgoing calls
no test coverage detected