Error raising style

Fredrik Lundh effbot at
Sun Feb 6 13:44:37 EST 2000

Gerrit Holl <gerrit.holl at> wrote:
> But I find this better:
> >>> raise Exception('aaa')
> because when raising an error with multiple errors, the former isn't
> possible:
> >>> raise Exception, 'aaa', 'bbb'
> Traceback (innermost last):
>   File "<stdin>", line 1, in ?
> TypeError: raise 3rd arg must be traceback or None

raise Exception, ('aaa', 'bbb')

> Guido's style guide doesn't talk about it, probably because the
> call-raising is only possible since class exceptions. Is all those
> code because of backward compatibility and people who are used to
> this style of raising exceptions?
> What do you think?

your guess is as good as mine...


More information about the Python-list mailing list