Re: catching object

2008-03-14 Thread Igor V. Rafienko
[ [EMAIL PROTECTED] ] [ ... ] I think inheritance is meant in reference to the Exception tree here. So, the uppermost class is `BaseException`. Python 3 gives this exception when trying to handle `object`:: TypeError: catching classes that do not inherit from BaseException is not

Re: catching object

2008-03-12 Thread Stargaming
On Wed, 12 Mar 2008 01:05:06 +0100, Igor V. Rafienko wrote: Hi, I was wondering if someone could help me explain this situation: h[1] import inspect h[1] inspect.getmro(ValueError) (type 'exceptions.ValueError', type 'exceptions.StandardError', type 'exceptions.Exception', type

catching object

2008-03-11 Thread Igor V. Rafienko
Hi, I was wondering if someone could help me explain this situation: h[1] import inspect h[1] inspect.getmro(ValueError) (type 'exceptions.ValueError', type 'exceptions.StandardError', type 'exceptions.Exception', type 'exceptions.BaseException', type 'object') h[2] try: raise