Hi,

I have two classes "A" and "B"


class A:
    def __init__(self, input):
        //do something on input



class B(A):
    def __init__(self, input):
        A.__init__(self, input)
        //do something


Then, I want to create two new classes "P" and "Q"


class P:
    def __init__(self, input):
        //do something different on input


class Q(p):
    def __init__(self, input):
        P.__init__(self, input)
        //do something



In class "Q", I want all the methods defined in class "B",  How do it?.
How redesign this class structure.
Note: constructor of class "A" and "B" doing different operations on input.
Note: But functionalities defined in class "B" should come in class "Q".
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to