[Python-Dev] PEP 553: Built-in debug()

Barry Warsaw barry at python.org
Wed Sep 6 10:42:51 EDT 2017

On Sep 5, 2017, at 19:31, Giampaolo Rodola' <g.rodola at gmail.com> wrote:
> True. Personally I have a shortcut in my IDE (Sublime) so I when I type "pdb" -> TAB it auto completes it.
> Somehow I think debug() would make this a bit harder as it's more likely a "debug()" line will pass unnoticed.
> For this reason I would give a -1 to this proposal.

I think if your linter or editor can take note of the pdb idiom, it can also do so for the debug() built-in.

> Personally I would find it helpful if there was a hook to choose the default debugger to use on "pdb.set_trace()" via .pdbrc or PYTHONDEBUGGER environment variable or something.
> I tried (unsuccessfully) to run ipdb on "pdb.set_trace()", I gave up and ended up emulating auto completion and commands history with this:
> https://github.com/giampaolo/sysconf/blob/master/home/.pdbrc.py

I don’t think that’s a good idea.  pdb is a thing, and that thing is the standard library debugger.  I don’t think ‘pdb’ should be the term we use to describe a generic Python debugger interface.  That to me is one of the advantages of PEP 553; it separates the act of invoking the debugging from the actual debugger so invoked.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 273 bytes
Desc: Message signed with OpenPGP
URL: <http://mail.python.org/pipermail/python-dev/attachments/20170906/3f7a6267/attachment.sig>

More information about the Python-Dev mailing list