Generators and propagation of exceptions
ethan at stoneleaf.us
Fri Apr 8 14:41:51 EDT 2011
> The code above implements an interactive session (a REPL). Therefore,
> what I'd like to get is an error information printed out at the output
> as soon as it becomes available.
1) Instead of yielding the error, call some global print function, then
continue on; or
2) Collect the errors, then have the top-most consumer check for errors
and print them out before reading the next generator output.
More information about the Python-list