On Sun, Sep 19, 2010 at 8:33 PM, Roelof Wobben <rwob...@hotmail.com> wrote:
> Hello, > > I changed the programm to this : > > import unittest > class Point: > def __init__(self, x=0, y=0): > self.x = x > self.y = y > > class Rectangle(object): > def __init__(self, base_point, width=0, length=0): > self.base_point = base_point > self.width = width > self.length = length > > def moverect(roelof, dx, dy): > roelof.base_point.y += dy > roelof.base_point.x +=dx > return roelof > > r = Rectangle(Point(3, 4), 20, 30) > moverect(r, 10, 11) > assert r.base_point.x == 13, "wrong x position %d" % r.base_point.x > assert r.base_point.y == 15, "wrong y position %d" % r.base_point.y > > But no output at all Which output had you expected, and why? -- André Engels, andreeng...@gmail.com _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor