[IPython-dev] Patches to use pydb instead of pdb for debugging
R. Bernstein
rocky at panix.com
Sat Oct 14 07:38:37 EDT 2006
Hans Meine writes:
> On Saturday 14 October 2006 08:42, Ville M. Vainio wrote:
> > The previous bug was fixed by this:
> >
> > def new_do_quit(self, arg):
> > - __IPYTHON__.Completer.all_completions=self.old_all_completions
> > +
> > + if hasattr(self, 'all_completions'):
> > + __IPYTHON__.Completer.all_completions=self.old_all_completions
> > return OldPdb.do_quit(self, arg)
> >
> > (it was AttributeError - there was no old_all_completions. Also see
> > whether there is a cleaner fix).
>
> Then why don't you check for "old_all_completions" but for "all_completions"?
> If that's an actual "svn diff" output I would think this fix is not necessary,
> since it cannot have fixed that problem. ;-p
Yes, although what you suggest is a more obvious, direct, and robust
fix, Ville's patch I do believe was correct. You see
old_all_completions was set in only if hasattr(self,
'all_completions') was true. This was set in the Debugger __init__
routine.
More information about the IPython-dev
mailing list