This shuld be solved by Lance's signal handling module -- the default
SIGINT handler will then raise KeyboardInterrupt. Until then, I'm not
going to change things. (Hey Lance! How's it going?)
> >mending possibility exists in a particular situation I think defining
> >a "hook" function would be more appropriate -- the default hook could
> >raise the exception or the code calling the hook could raise the
> >exception if the hook didn't fix the problem. Anyway, most exceptions
> That would be convenient, and solve the problem above. How does the
> "hook" function fix the problem? By returning a special value?
Hook functions would be defined with an interface that would allow
them to mend things. This depends very much on the kind of problem to
be mended. I was thinking of very specific hooks for very specific
situations -- not a general "hook" mechanism to be invoked where
currently exceptions are used.
> I still think an exception object (as proposed a while ago) would give
> a cleaner interface than all this special "hook" stuff.
I must admit I don't remember how exception objects were defined. Was
this during one of my absences?
--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
PS I junked the -k flag tonight. It felt really good cutting out
those lines of code :-)