Hallvard B Furuseth <[EMAIL PROTECTED]> writes:
> > class NeverRaised(Exception): pass
> > for ex in ZeroDivisionError, NeverRaised:
> 
> Heh.  Simple enough.  Unless some obstinate person raises it anyway...

Hmm, ok, how's this?:

   def NeverRaised():
     class blorp(Exception): pass
     return blorp
   for ex in ZeroDivisionError, NeverRaised():
     ...
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to