Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python generic class inheritance

# python generic class inheritance

class ParentClass():
    def ParentFunction(self):
        print("Parent function")

class ChildClass(ParentClass):
    def ChildFunction(self):
        print("Child function")

var = ChildClass()

var.ChildFunction() # Child function
var.ParentFunction() # This function is inherited from ParentClass
 
PREVIOUS NEXT
Tagged: #python #generic #class #inheritance
ADD COMMENT
Topic
Name
1+9 =