##// END OF EJS Templates
Don't call curframe.f_locals...
Quentin Peter -
Show More
@@ -605,7 +605,7 b' class Pdb(OldPdb):'
605 """Print the call signature for any callable object.
605 """Print the call signature for any callable object.
606
606
607 The debugger interface to %pdef"""
607 The debugger interface to %pdef"""
608 namespaces = [('Locals', self.curframe.f_locals),
608 namespaces = [('Locals', self.curframe_locals),
609 ('Globals', self.curframe.f_globals)]
609 ('Globals', self.curframe.f_globals)]
610 self.shell.find_line_magic('pdef')(arg, namespaces=namespaces)
610 self.shell.find_line_magic('pdef')(arg, namespaces=namespaces)
611
611
@@ -613,7 +613,7 b' class Pdb(OldPdb):'
613 """Print the docstring for an object.
613 """Print the docstring for an object.
614
614
615 The debugger interface to %pdoc."""
615 The debugger interface to %pdoc."""
616 namespaces = [('Locals', self.curframe.f_locals),
616 namespaces = [('Locals', self.curframe_locals),
617 ('Globals', self.curframe.f_globals)]
617 ('Globals', self.curframe.f_globals)]
618 self.shell.find_line_magic('pdoc')(arg, namespaces=namespaces)
618 self.shell.find_line_magic('pdoc')(arg, namespaces=namespaces)
619
619
@@ -622,7 +622,7 b' class Pdb(OldPdb):'
622
622
623 The debugger interface to %pfile.
623 The debugger interface to %pfile.
624 """
624 """
625 namespaces = [('Locals', self.curframe.f_locals),
625 namespaces = [('Locals', self.curframe_locals),
626 ('Globals', self.curframe.f_globals)]
626 ('Globals', self.curframe.f_globals)]
627 self.shell.find_line_magic('pfile')(arg, namespaces=namespaces)
627 self.shell.find_line_magic('pfile')(arg, namespaces=namespaces)
628
628
@@ -630,7 +630,7 b' class Pdb(OldPdb):'
630 """Provide detailed information about an object.
630 """Provide detailed information about an object.
631
631
632 The debugger interface to %pinfo, i.e., obj?."""
632 The debugger interface to %pinfo, i.e., obj?."""
633 namespaces = [('Locals', self.curframe.f_locals),
633 namespaces = [('Locals', self.curframe_locals),
634 ('Globals', self.curframe.f_globals)]
634 ('Globals', self.curframe.f_globals)]
635 self.shell.find_line_magic('pinfo')(arg, namespaces=namespaces)
635 self.shell.find_line_magic('pinfo')(arg, namespaces=namespaces)
636
636
@@ -638,13 +638,13 b' class Pdb(OldPdb):'
638 """Provide extra detailed information about an object.
638 """Provide extra detailed information about an object.
639
639
640 The debugger interface to %pinfo2, i.e., obj??."""
640 The debugger interface to %pinfo2, i.e., obj??."""
641 namespaces = [('Locals', self.curframe.f_locals),
641 namespaces = [('Locals', self.curframe_locals),
642 ('Globals', self.curframe.f_globals)]
642 ('Globals', self.curframe.f_globals)]
643 self.shell.find_line_magic('pinfo2')(arg, namespaces=namespaces)
643 self.shell.find_line_magic('pinfo2')(arg, namespaces=namespaces)
644
644
645 def do_psource(self, arg):
645 def do_psource(self, arg):
646 """Print (or run through pager) the source code for an object."""
646 """Print (or run through pager) the source code for an object."""
647 namespaces = [('Locals', self.curframe.f_locals),
647 namespaces = [('Locals', self.curframe_locals),
648 ('Globals', self.curframe.f_globals)]
648 ('Globals', self.curframe.f_globals)]
649 self.shell.find_line_magic('psource')(arg, namespaces=namespaces)
649 self.shell.find_line_magic('psource')(arg, namespaces=namespaces)
650
650
General Comments 0
You need to be logged in to leave comments. Login now