On Tue, Feb 5, 2013 at 5:51 PM, Laxmikant Chitare
<laxmikant.gene...@gmail.com> wrote:
> One more thing, apart from what Albert mentioned.
> Exceptions must be classes or instances. In effect you cannot just do
> 'raise'. 'raise' statement must be followed by a class or an instance.

You can inside an except clause.

>>> try:
        1/0
except:
        print("I got an exception!")
        raise

I got an exception!
Traceback (most recent call last):
  File "<pyshell#5>", line 2, in <module>
    1/0
ZeroDivisionError: division by zero


ChrisA
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to