Danny Yoo wrote:

> 
> ###########################################################
> ## Pseudocode for sending 'x' to every listener (untested)
> class CallbackError(Exception):
>     pass
> 
> for l in self.listeners:
>     try:
>         l(x)
>     except Exception, e:
>         raise CallbackError, ("%s failed" % l.__name__, e)
> ###########################################################
> 
Danny:

Ok I tried this and it is good.

I don't think that I need the _internal_shout anymore as this code 
already wraps the exception handling and I can decide what I want to 
display in the above except statement.

Unless I am missing something?

Thanks again,

Don.

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to