spacepaste

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