spacepaste

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