Friday, October 13, 2017

What's new in Python 3.7

There are many things in the Python 3.7 release notes but I like this:

PEP 553 describes a new built-in called breakpoint() which makes it easy and consistent to enter the Python debugger. Built-in breakpoint() calls sys.breakpointhook(). By default, this latter imports pdb and then calls pdb.set_trace(), but by binding sys.breakpointhook() to the function of your choosing, breakpoint() can enter any debugger. Or, the environment variable PYTHONBREAKPOINT can be set to the callable of your debugger of choice. Set PYTHONBREAKPOINT=0 to completely disable built-in breakpoint().

No comments:

Post a Comment