# square.py - a simple square class extending the Rect class # CS 313 - example for inheritance and modules import rect class Square(rect.Rect): def __init__(self, x=0, y=0, size=0): rect.Rect.__init__(self, x, y, size, size) # call Rect constructor d = Square(30, 40, 100) print "d = %s, area = %d" % (d, d.area())