class MyClass(object):
   def __init__(self, really_init=True):
       self.a = 3
       self.b = 4
       # other initialization
       if really_init: on_load()

   def on_load(self):
       print 'hello!'

class B(MyClass):
    def __init__(self):
        super(B, self).__init__(False)
        self.c = 4
        print "B initialized"
       MyClass.on_load()

    def on_load(self):
        print 'hello!'


Would this work?

(posted it again to include the python-list in To:)

-- 
Armin Moradi
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to