[Python-Dev] Style for raising exceptions (python-dev Summary for 2005-08-01 through 2005-08-15 [draft])

Guido van Rossum gvanrossum at gmail.com
Fri Aug 26 01:59:31 CEST 2005

On 8/25/05, skip at pobox.com <skip at pobox.com> wrote:
> I do have a followup question on the style thing.  (I'll leave others to
> answer MAL's question about optimization.)  If I want to raise an exception
> without an argument, which of the following is the proper form?
>     raise ValueError
>     raise ValueError()

The latter.

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list