[Python-Dev] PEP 553: Built-in debug()
v+python at g.nevcal.com
Thu Sep 7 19:58:32 EDT 2017
On 9/7/2017 4:19 PM, Terry Reedy wrote:
> A somewhat separate point: the name breakpoint() is slightly
> misleading, which has consequences if it is (improperly) called more
> than once. While breakpoint() acts as a breakpoint, what it does (at
> least in the default pdb case) is *initialize* and start a *new*
> debugger, possibly after an import.
So maybe the original debug() call should be renamed debugger() [but
with the extra optional parameters discussed], and an additional
breakpoint() call could be added that would be much more like hitting a
breakpoint in the already initialized debugger.
There seem to be two directions to go here: If breakpoint is called
without a prior call to debugger, it should (1) call debugger implicitly
with defaults, or (2) be a noop.
I prefer the latter, but either is workable. Or, one could add all
those parameters to every breakpoint() call, which makes (1) more
workable, but code more wordy.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev