Why "class exceptions" are not deprecated?
Steven Bethard
steven.bethard at gmail.com
Tue Mar 21 16:25:05 EST 2006
Gregory Petrosyan wrote:
> 1) From 2.4.2 documentation:
> There are two new valid (semantic) forms for the raise statement:
> raise Class, instance
> raise instance
Check `PEP 8`_ -- the latter form is preferred:
"""
When raising an exception, use "raise ValueError('message')" instead of
the older form "raise ValueError, 'message'".
"""
.. _PEP 8: http://www.python.org/dev/peps/pep-0008/
STeVe
More information about the Python-list
mailing list