"""Simple illustration of a Python class inheritance hirearchy >>> import parentchild >>> c = parentchild.Child(32, 'house') >>> c >>> c.x 32 >>> c.y 'house' >>> p = parentchild.Parent(16) >>> p >>> p.x 16 """ class Parent(object): def __init__(self, x): self.x = x class Child(Parent): def __init__(self, x, y): super(Child, self).__init__(x) self.y = y