I have a class:
class Foo():
def __init__(self):
self.a = 1
and it's child:
class Bar(Foo):
def __init__(self, foo, string):
Foo.__init__(self)
self.b = string
I need to create a Foo()-object from Bar()-object How can I do this?
i.e:
a = Foo()
a.a = 2
print a.a
b = Bar(a, 'ololo')
print b.a
print b.b
I get printed this:
2
1
ololo
and expecting this:
2
2
ololo