spacepaste

  1.  
  2. class Parent:
  3. def __init__(self,*args):
  4. self.args = args
  5. class Child(Parent):
  6. def __init__(self, *args): #child inherit
  7. super(Child, self).__init__(*args)
  8. return self
  9. c = new Child('nattr1','newattr1','newattr2')
  10. print(c.__dict__)
  11.