Skip to content

bpo-37976: Prevent shadowing of TypeError in zip() #15592

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
Aug 30, 2019

Conversation

sir-sigurd
Copy link
Contributor

@sir-sigurd sir-sigurd commented Aug 29, 2019

@@ -2549,8 +2549,8 @@ zip_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
PyObject *it = PyObject_GetIter(item);
if (it == NULL) {
if (PyErr_ExceptionMatches(PyExc_TypeError))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might make sense to do the same for all exceptions types, but I'm not sure if it's OK for compatibility.

@rhettinger rhettinger self-assigned this Aug 29, 2019
@miss-islington
Copy link
Contributor

Thanks @sir-sigurd for the PR, and @rhettinger for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 30, 2019
(cherry picked from commit 6a650aa)

Co-authored-by: Sergey Fedoseev <[email protected]>
@bedevere-bot
Copy link

GH-15607 is a backport of this pull request to the 3.8 branch.

@miss-islington
Copy link
Contributor

Thanks @sir-sigurd for the PR, and @rhettinger for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @sir-sigurd for the PR, and @rhettinger for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-15608 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 30, 2019
(cherry picked from commit 6a650aa)

Co-authored-by: Sergey Fedoseev <[email protected]>
rhettinger pushed a commit that referenced this pull request Aug 30, 2019
@sir-sigurd sir-sigurd deleted the zip-shadow-error branch August 30, 2019 18:22
lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
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.

5 participants