Inheritance

Calling Methods in the Base Class

     class A:
        def foo(self):
            print "Class A: foo"
     
     class B(A):         # Inherits from class A
        def foo(self):
            print "Class B: foo"
            A.foo(self)  # Call foo-method in class A

Most commonly used in object initialization

     class B(A):
         def __init__(self,args):
              # Initialize the base class
              A.__init__(self)
              # Initialize myself
              ... 
<<< O'Reilly OSCON 2000, Introduction to Python, Slide 97
July 17, 2000, beazley@cs.uchicago.edu
>>>