[Python-ideas] Map and filter should also convert StopIteration to RuntimeError

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Dec 13 01:36:55 CET 2014

Terry Reedy wrote:
> PEP 479 reverses 
> this acceptance by having generator.__next turn StopIteration raised in 
> a user-written generator function body into a RuntimeError.  I propose 
> that other builtin iterator.__next__ methods that execute a passed in 
> function do the same.

Maybe also any user-written function whose
name isn't "__next__"?


More information about the Python-ideas mailing list