Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python subclass with extra arguments

class Superclass(object):
    def __init__(self, arg1, arg2, arg3):
        #Initialise some variables
        #Call some methods

class Subclass(Superclass):
    def __init__(self, subclass_arg1, *args, **kwargs):
        super(Subclass, self).__init__(*args, **kwargs)
        #Call a subclass only method
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #subclass #extra #arguments
ADD COMMENT
Topic
Name
2+3 =