On Sep 5, 2017, at 20:15, Guido van Rossum <gu...@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 <n...@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/magics.html#magic-debug > 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.) Cheers, -Barry
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com