From 4d2184138e4ad630f2149b16e53f903185aa2d8f 2016-06-01 09:31:05 From: Thomas Kluyver Date: 2016-06-01 09:31:05 Subject: [PATCH] Simplify picking debugger class --- diff --git a/IPython/terminal/ptshell.py b/IPython/terminal/ptshell.py index 3ac5a2f..cb63634 100644 --- a/IPython/terminal/ptshell.py +++ b/IPython/terminal/ptshell.py @@ -45,7 +45,6 @@ class TerminalInteractiveShell(InteractiveShell): pt_cli = None debugger_history = None - debugger_cls = TerminalPdb simple_prompt = Bool(_use_simple_prompt, help="""Use `raw_input` for the REPL, without completion, multiline input, and prompt colors. @@ -59,13 +58,9 @@ class TerminalInteractiveShell(InteractiveShell): """ ).tag(config=True) - @observe('simple_prompt') - def _simple_prompt_changed(self, changes): - if changes['new'] == True: - self.debugger_cls = Pdb - else: - self.debugger_cls = TerminalPdb - + @property + def debugger_cls(self): + return Pdb if self.simple_prompt else TerminalPdb autoedit_syntax = Bool(False, help="auto editing of files with syntax errors.",