Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python super init

class test:
  def __init__(self, *args):
    print(f"called test with: {args}")

class testing(test):
  def __init__(self, *args):
    print(f"Called testing with: {args}")
    super().__init__(*args)
        
testing("hmm")
# super is a keyword that calls the parent class 
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #python #super #init
ADD COMMENT
Topic
Name
8+6 =