Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-38054: enhance pdb.set_trace() to run when the specified condition is true #15731

Closed
wants to merge 1 commit into from
Closed

bpo-38054: enhance pdb.set_trace() to run when the specified condition is true #15731

wants to merge 1 commit into from

Conversation

alex-ulnv
Copy link

@alex-ulnv alex-ulnv commented Sep 8, 2019

  • Added a new key-word argument trigger to pdb.set_trace() method. If specified, set_trace() will execute only when the condition is true.
  • Added a unit test for the trigger kwarg
  • Updated documentation

https://bugs.python.org/issue38054

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Our records indicate we have not received your CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for your contribution, we look forward to reviewing it!

@zware
Copy link
Member

zware commented Sep 11, 2019

As mentioned in the issue, this use-case is better served by conditional expressions or an and short-circuit. Thanks for the idea, though!

@zware zware closed this Sep 11, 2019
@alex-ulnv alex-ulnv deleted the pdb_trace_on_condition branch September 11, 2019 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants