On 8/16/07, 7stud <[EMAIL PROTECTED]> wrote:
> When I run the following code and call super() in the Base class's
> __init__ () method, only one Parent's __init__() method is called.
As the other posters have mentioned, each class needs to make a call
to super. This is because the super call does
7stud wrote:
> When I run the following code and call super() in the Base class's
> __init__ () method, only one Parent's __init__() method is called.
>
>
> class Parent1(object):
> def __init__(self):
> print "Parent1 init called."
> self.x = 10
>
> class Parent2(object):
>
7stud <[EMAIL PROTECTED]> wrote:
> When I run the following code and call super() in the Base class's
> __init__ () method, only one Parent's __init__() method is called.
>
>
> class Parent1(object):
> def __init__(self):
> print "Parent1 init called."
> self.x = 10
>
> cla
When I run the following code and call super() in the Base class's
__init__ () method, only one Parent's __init__() method is called.
class Parent1(object):
def __init__(self):
print "Parent1 init called."
self.x = 10
class Parent2(object):
def __init__(self):
pr