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 >

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) > (, , > , , 'object'>) > h[2] >>> try: > raise ValueError("argh") > except object: >