[Python-Dev] PEP 553: Built-in debug()
Guido van Rossum
guido at python.org
Wed Sep 6 10:46:00 EDT 2017
IIRC they indeed insinuate debug() into the builtins. My suggestion is also
On Wed, Sep 6, 2017 at 7:39 AM, Barry Warsaw <barry at python.org> wrote:
> On Sep 5, 2017, at 20:15, Guido van Rossum <guido at python.org> wrote:
> > Yeah, I like the idea, but I don't like the debug() name -- IIRC there's
> a helper named debug() in some codebase I know of that prints its arguments
> under certain circumstances.
> > On Tue, Sep 5, 2017 at 7:58 PM, Nathaniel Smith <njs at pobox.com> wrote:
> > Maybe breakpoint() would be a better description of what set_trace()
> > actually does?
> Originally I was thinking of a keyword like ‘break here’, but once (after
> discussion with a few folks at the sprint) I settled on a built-in
> function, I was looking for something concise that most directly reflected
> the intent. Plus I knew I wanted to mirror the sys.*hooks, so again I
> looked for something short. debug() was the best I could come up with!
> breakpoint() could work, although would the hooks then be
> sys.breakpointhook() and sys.__breakpointhook__? Too bad we can’t just use
> break() :).
> Guido, is that helper you’re thinking of implemented as a built-in? If
> you have a suggestion, it would short-circuit the inevitable bikeshedding.
> > This would also avoid confusion with IPython's very
> > useful debug magic:
> > https://ipython.readthedocs.io/en/stable/interactive/
> > and which might also be worth stealing for the builtin REPL.
> > (Personally I use it way more often than set_trace().)
> Interesting. I’m not an IPython user. Do you think its %debug magic
> would benefit from PEP 553?
> (Aside: improving/expanding the stdlib debugger is something else I’d like
> to work on, but this is completely independent of PEP 553.)
> Python-Dev mailing list
> Python-Dev at python.org
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev