Hi, The following example doesn't work as I would like-- the child instance doesn't expose the attribute set in the parent. Can someone point out what I am missing?
Thanks, Marcus class Parent(object): def __init__(self, name="I am a parent"): self.name = name class Child(Parent): def __init__(self, number): super(Parent, self).__init__("I am a child") self.number = number # I would like it to produce the following: >> c = Child(23) >> c.number 23 >> c.name "I am a child" # but I 'AttributeError: 'Child' object has no attribute 'name'' _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor