-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
Conversation
Python/bltinmodule.c
Outdated
@@ -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)) |
There was a problem hiding this comment.
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.
271651a
to
756ca31
Compare
Thanks @sir-sigurd for the PR, and @rhettinger for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8. |
(cherry picked from commit 6a650aa) Co-authored-by: Sergey Fedoseev <[email protected]>
GH-15607 is a backport of this pull request to the 3.8 branch. |
Thanks @sir-sigurd for the PR, and @rhettinger for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8. |
Thanks @sir-sigurd for the PR, and @rhettinger for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8. |
GH-15608 is a backport of this pull request to the 3.8 branch. |
(cherry picked from commit 6a650aa) Co-authored-by: Sergey Fedoseev <[email protected]>
(cherry picked from commit 6a650aa) Co-authored-by: Sergey Fedoseev <[email protected]>
https://bugs.python.org/issue37976