Generators and propagation of exceptions

Raymond Hettinger python at
Fri Apr 8 16:33:20 EDT 2011

On Apr 8, 12:47 pm, r < at> wrote:
> Anyway, thank you all for helping me out and bringing some ideas to
> the table. I was hoping there might be some pattern specifically
> designed for thiskind of job (exception generators anyone?), which
> I've overlooked. If not anything else, knowing that this isn't the
> case, makes me feel better about the solution I've chosen.

Sounds like you've gathered a bunch of good ideas and can now be
pretty sure of your design choices.

While it doesn't help your current use case, you might be interested
in the iter_except() recipe in


twitter: @raymondh

More information about the Python-list mailing list