Error raising style
effbot at telia.com
Sun Feb 6 13:44:37 EST 2000
Gerrit Holl <gerrit.holl at pobox.com> wrote:
> But I find this better:
> >>> raise Exception('aaa')
> because when raising an error with multiple errors, the former isn't
> >>> 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