[issue38054] enhance pdb.set_trace() to run when the specified condition is true

2019-09-11 Thread Zachary Ware
Zachary Ware added the comment: I was actually leaning in favor of this, but Jason's examples are very compelling and require no changes to other `breakpoint()`-compatible debuggers to work as expected. Thanks for the idea, though! -- nosy: +zach.ware resolution: -> rejected

[issue38054] enhance pdb.set_trace() to run when the specified condition is true

2019-09-11 Thread Jason R. Coombs
Jason R. Coombs added the comment: Or even more concise: trigger and breakpoint() -- ___ Python tracker ___ ___ Python-bugs-list

[issue38054] enhance pdb.set_trace() to run when the specified condition is true

2019-09-11 Thread Jason R. Coombs
Jason R. Coombs added the comment: You could just do breakpoint() if trigger else None Concise, easy, and avoids complicating set_trace(). -- nosy: +jaraco ___ Python tracker

[issue38054] enhance pdb.set_trace() to run when the specified condition is true

2019-09-10 Thread Alexander Ulyanov
Alexander Ulyanov added the comment: Perhaps it's a matter of preference. I found it convenient, since passing in a boolean expression allows me to get rid of extra if-blocks thus reducing lines of code and increasing debugging speed. I wanted to share my idea with the community - but

[issue38054] enhance pdb.set_trace() to run when the specified condition is true

2019-09-09 Thread Lisa Roach
Lisa Roach added the comment: Does this flag make things much easier? You would still need an if statement in order to correctly pass in True/False for the trigger flag. -- nosy: +lisroach ___ Python tracker

[issue38054] enhance pdb.set_trace() to run when the specified condition is true

2019-09-08 Thread Alexander Ulyanov
Change by Alexander Ulyanov : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38054] enhance pdb.set_trace() to run when the specified condition is true

2019-09-08 Thread Alexander Ulyanov
Change by Alexander Ulyanov : -- keywords: +patch pull_requests: +15384 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15731 ___ Python tracker

[issue38054] enhance pdb.set_trace() to run when the specified condition is true

2019-09-08 Thread Alexander Ulyanov
New submission from Alexander Ulyanov : Through out my experience with python debugger, I often found myself creating if-statements around set_trace() instructions. This patch introduces a key-word argument that allows to pass in a boolean or a condition that evaluates to boolean to control