What c.l.py's opinions about Soft Exception?

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Tue Mar 11 19:02:12 CET 2008

On Mon, 10 Mar 2008 12:14:40 -0700, metawilm at gmail.com wrote:

> Common Lisp has two ways of raising: functions "error" and "signal".
> Python's "raise" is like CL's "error": you end up in the debugger if the
> exception is not handled. Exceptions that are raised by CL's "signal"
> don't have to be caught: if there is no matching "except" clause the
> raise statement becomes a "pass".
> Or as Wikipedia states nicely: "Conditions are a generalization of
> exceptions. When a condition arises, an appropriate condition handler is
> searched for and selected, in stack order, to handle the condition.
> Conditions which do not represent errors may safely go unhandled
> entirely; their only purpose may be to propagate hints or warnings
> toward the user."
> http://en.wikipedia.org/wiki/Exception_handling#Condition_systems

If I had come across "signals" before now, I would have thought that they 
were a good idea. 

But after watching Lie repeatedly argue for tightly coupling functions 
together using signal-like "SoftExceptions", all I can see are the 

I'm afraid that if Lie's arguments are the best available for such a 
signaling mechanism, then it's probably a good thing Python doesn't have 


More information about the Python-list mailing list