Skip to content

Update contextlib.py #266

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

Merged
merged 1 commit into from
Mar 1, 2017
Merged

Update contextlib.py #266

merged 1 commit into from
Mar 1, 2017

Conversation

amosonn
Copy link
Contributor

@amosonn amosonn commented Feb 24, 2017

Moved raise from inside try to try..else.
The exception raised, in case the generator doesn't stop after .raise, should be raised in an else block. This is a) more readable, b) saves the catching, checking and reraising of this exception.

Moved raise from inside try to try..else.
@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).

Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA. This is necessary for legal reasons before we can look at your contribution. Please follow these steps to help rectify the issue:

  1. If you don't have an account on b.p.o, please create one
  2. Make sure your GitHub username is listed in "Your Details" at b.p.o
  3. If you have not already done so, please sign the PSF contributor agreement
  4. If you just signed the CLA, please wait at least one US business day and then check "Your Details" on bugs.python.org to see if your account has been marked as having signed the CLA (the delay is due to a person having to manually check your signed CLA)
  5. Reply here saying you have completed the above steps

Thanks again to your contribution and we look forward to looking at it!

@zhangyangyu
Copy link
Member

Hi, @amosonn , to contribute you need to sign the CLA and it's appreciated for any bug/enhancement report to open an issue on http://bugs.python.org/ first.

@zhangyangyu zhangyangyu self-requested a review February 24, 2017 09:55
@zhangyangyu zhangyangyu requested a review from ncoghlan March 1, 2017 06:07
@ncoghlan ncoghlan merged commit 680e20b into python:master Mar 1, 2017
@ncoghlan
Copy link
Contributor

ncoghlan commented Mar 1, 2017

I agree this is a little clearer than the original, so I went ahead and merged it. There's no functional impact though, so I didn't worry about adding a NEWS entry.

@Mariatta
Copy link
Member

I'm backporting this into 3.5 and 3.6 to make the backport for #949 goes smoother.

akruis pushed a commit to akruis/cpython that referenced this pull request Jun 11, 2021
Automatically regenerate slp_exttype.h.
akruis added a commit to akruis/cpython that referenced this pull request Jun 18, 2021
jaraco pushed a commit that referenced this pull request Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants