Hi all,


Say I have 10 functions in base class and I have inherited it in some
derived class.

But I only want 9 of the base class function to be available in child class.
(and I don’t want to make that one class private)



class x:

    def __init__(self):

        self.a =3

        self.b= 4

    def A(self):

        print (self.a)

    def B(self):

        print (self.b)



class y(x):

    def __init__(self):

        x.__init__(self)

        del (self.A)                                  #This is giving    del
(self.A)

AttributeError: A





Anticipating your reply soon.

-- 
Nitin K
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to