Re: User-defined exceptions from 2.6

2010-02-01 Thread Joan Miller
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

Re: User-defined exceptions from 2.6

2010-02-01 Thread Steven D'Aprano
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

User-defined exceptions from 2.6

2010-02-01 Thread Joan Miller
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