mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Issue #665761: functools.reduce() will no longer mask exceptions other
than TypeError raised by the iterator argument. Also added a test to check that zip() already behaves similarly.
This commit is contained in:
parent
27354ccec9
commit
e29e6bffb5
4 changed files with 26 additions and 8 deletions
|
@ -1234,6 +1234,7 @@ class BuiltinTest(unittest.TestCase):
|
|||
class G:
|
||||
pass
|
||||
self.assertRaises(TypeError, zip, a, G())
|
||||
self.assertRaises(RuntimeError, zip, a, TestFailingIter())
|
||||
|
||||
# Make sure zip doesn't try to allocate a billion elements for the
|
||||
# result list when one of its arguments doesn't say how long it is.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue