Re: Best practise hierarchy for user-defined exceptions

2008-11-18 Thread Scott David Daniels
Nick Craig-Wood wrote: Slaunger [EMAIL PROTECTED] wrote: I will not notice that it was an unanticpated condition in my own code, which caused the ValueError to be raised. If I had just inherited from MyError, it would fall through I'd say if the above code worries you, then

Best practise hierarchy for user-defined exceptions

2008-11-17 Thread Slaunger
Hi there, I am a newcomer to Pyhton coming from Java working on a relatively large Pyhton project with several packages and modules. To improve exception handling I would like to introduce some user-defined exceptions to distinguish between exceptions raised in self-written code as compared to

Re: Best practise hierarchy for user-defined exceptions

2008-11-17 Thread Chris Rebert
On Mon, Nov 17, 2008 at 3:47 AM, Slaunger [EMAIL PROTECTED] wrote: Hi there, I am a newcomer to Pyhton coming from Java working on a relatively large Pyhton project with several packages and modules. To improve exception handling I would like to introduce some user-defined exceptions to

Re: Best practise hierarchy for user-defined exceptions

2008-11-17 Thread Slaunger
On 17 Nov., 13:05, Chris Rebert [EMAIL PROTECTED] wrote: On Mon, Nov 17, 2008 at 3:47 AM, Slaunger [EMAIL PROTECTED] wrote: . Here is my stub-implemented idea on how to do it so far, which is inspired by how I would have done it in Java (but which may not be very Pythonic??):

Re: Best practise hierarchy for user-defined exceptions

2008-11-17 Thread Nick Craig-Wood
Slaunger [EMAIL PROTECTED] wrote: On 17 Nov., 13:05, Chris Rebert [EMAIL PROTECTED] wrote: On Mon, Nov 17, 2008 at 3:47 AM, Slaunger [EMAIL PROTECTED] wrote: . Here is my stub-implemented idea on how to do it so far, which is inspired by how I would have done it in Java (but