Generators and propagation of exceptions

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


On Apr 8, 12:47 pm, r <nbs.pub... at gmail.com> 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 http://docs.python.org/py3k/library/itertools.html#itertools-recipes

Raymond

twitter: @raymondh



More information about the Python-list mailing list