raisesupports up to three arguments; the first two are the type and value, the third is the trace object to use for exclusion. Line:
raise Exception, value
usually exactly equivalent:
raise Exception(value)
therefore, we create an instance Exception()by passing the second value as an argument to the exception constructor.
, , E, Exception , , :
raise Exception, e
:
raise e
:
raise E, ()
None:
raise E, None
E ; , E; None raise E().
, raise Exception Python , .
raise:
, . : , . , ; None, , . , , .
, , . , raise Python 3, . PEP 3109 - Python 3000.