[ [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
>
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:
>
Hi,
I was wondering if someone could help me explain this situation:
h[1] >>> import inspect
h[1] >>> inspect.getmro(ValueError)
(, ,
, ,
)
h[2] >>> try:
raise ValueError("argh")
except object:
print "why not?"
Traceback (most recent call last):
File "", line 2, in
ValueError: argh