[issue46621] Should map(function, iterable, ...) replace StopIteration with RuntimeError?

2022-02-03 Thread Vedran Čačić
Vedran Čačić added the comment: Just for the record, I consider PEP 479 one of (very rare) design bugs in Python, and would like it reversed some day. (So anything that helps this outcome, including -1 on this, is welcome.) It subverts the natural property of exceptions (that they bubble thro

[issue46621] Should map(function, iterable, ...) replace StopIteration with RuntimeError?

2022-02-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 for being a breaking change, for addressing a minor issue that rarely arises in real life, and for being a slippery slope. -- nosy: +rhettinger ___ Python tracker ___

[issue46621] Should map(function, iterable, ...) replace StopIteration with RuntimeError?

2022-02-02 Thread Peiran Yao
New submission from Peiran Yao : Currently, StopIteration raised accidentally inside the `function` being applied is not caught by map(). This will cause the iteration of the map object to terminate silently. (Whereas, when some other exception is raised, a traceback is printed pinpointing th