[issue22761] Catching StopIteraion inside list comprehension

2014-10-29 Thread yotamv
yotamv added the comment: Inside a list comprehension expression, if a StopIteration exception is raised, the interpreter assumes the exception was raised by the object Iterated by the list comprehension expression. For example, this generator will never stop, and will keep returning empty

[issue22761] Catching StopIteraion inside list comprehension

2014-10-29 Thread yotamv
New submission from yotamv: Inside a list comprehension expression, if a StopIteration exception is raised, the interpreter assumes the exception was raised by the object Iterated buy the list comprehension expression. For example, this generator will never stop, and will keep returning empty