modifying inherited methods

Thomas Thiele thiele at muc.das-werk.de
Fri May 19 05:29:35 EDT 2000


I did it always so (not only in python):

class A:
    def __init__(self, ....):
        ....complicated stuff
        self.costumize_init()
        .....other complicated stuff

    def costumize_init(self):      #in C++ a virtual function, it's clear
        ....things you only need to do in A

class B(A):
    def costumize_init(self):
        ....things you only need to do in B





More information about the Python-list mailing list