All pastes #243734 Raw Edit

Miscellany

public python v1 · immutable
·published 2006-11-08 20:59 UTC
rendered paste body
i have class Foo(object):   def __init__(self, a=1, b=2):      self.a=a      self.b=band a lot of class Bla(Foo):   def __init__(self, a=1, b=2, t=3, h=8):      self.t=t      self.h=h      Foo.__init__(self, a=a, b=b)now i wants to "extend" Foo in my module and add c=3 in __init__ i.e.class Foo(Foo):   def __init__(self, a=1, b=2, c=3):      self.c=c      Foo.__init__(self, a=a, b=b)the goal is:t=Bla(a=11, b=22, c=33)whithout Bla modification... if this possible? how do you usually do such things?