Help: except clause ordering

Rene Pijlman reageer.in at de.nieuwsgroep
Sat Mar 1 19:09:02 EST 2003


Bob:
>C:\Python22\Doc\tut\node11.html#SECTION0011100000000000000000 is the
>location on my PC with the 9.7.1 Exceptions Can Be Classes section
>displayed you can see this example which will display

I tried to access your harddisk, but it failed :-) Let's use
this:
http://www.python.org/doc/current/tut/node11.html#SECTION0011710000000000000000

>class B:
>    pass
>class C(B):
       ^^^^
>    pass
>class D(C):
       ^^^^
>    pass

>Why B, B, B rather than D, C, B?

C inherits from B, and therefore every instance of C is also an
instance of B.

Likewise, D inherits from C, and therefore every instance of D
is also an instance of C, and is also an instance of B.

-- 
René Pijlman

Wat wil jij leren?  http://www.leren.nl




More information about the Python-list mailing list