[IPython-dev] Why does Debugger.Pdb inherit from bdb.Bdb, cmd.Cmd?
Fernando.Perez at colorado.edu
Sun May 22 14:40:18 CDT 2005
Tom Locke wrote:
> I'm writing a custom Python debugger. The base class will either be
> pdb.Pdb or IPython.Debugger.Pdb if that is available.
> I noticed that IPython .Pdb inherits from dbd.Bdb and cmd.Cmd directly,
> despite the fact that pdb.Pdb already does so. I don't understand why,
> so I just wanted to ask in case I'm missing something important.
> I realise Debugger.Pdb.__init__ cannot call pdb.Pdb.__init__ directly,
> as it needs to pass completekey=None to Cmd.__init__, but I don't see
> why it can't just have pdb.Pdb as its single base class.
> Am I missing something?
Nope, nothing. In fact, it was probably just carelessness on my part, I just
fixed it to read:
"""Modified Pdb class, does not load readline."""
and I can't see any ill effects. This will go into the .14 bugfix (a few days
Thanks for pointing this out.
More information about the IPython-dev