0
class class1 :

    def method1(self):
        print("Method1 in Class1")


class class2(class1) :

    def method1(self):
        class1.method1(self)
        print("Method1 in Class2")

ob = class2()

ob.method1()

This is the question I have... I want to call method1 of class1 outside of class2. Likewise, is there a method to call within ob.method1() Without calling it inside method1 of class2?

ZygD
  • 22,092
  • 39
  • 79
  • 102

1 Answers1

0

You can do it, but it's a very bad idea. You do it exactly the same way you do within class2:

class1.method1(ob)
Tim Roberts
  • 48,973
  • 4
  • 21
  • 30