On 1 feb, 12:45, Steven D'Aprano wrote:
> On Mon, 01 Feb 2010 02:19:39 -0800, Joan Miller wrote:
> > Which is the best way to create user-defined exceptions since that
> > *BaseException.message* is deprecated in Python 2.6 ?
>
> Inherit from an existing exception.
>
> >>> class MyValueException(V
On Mon, 01 Feb 2010 02:19:39 -0800, Joan Miller wrote:
> Which is the best way to create user-defined exceptions since that
> *BaseException.message* is deprecated in Python 2.6 ?
Inherit from an existing exception.
>>> class MyValueException(ValueError):
... pass
...
>>>
>>> raise MyValue
Which is the best way to create user-defined exceptions since that
*BaseException.message* is deprecated in Python 2.6 ?
--
http://mail.python.org/mailman/listinfo/python-list