oo problem

Tool69 kibleur.christophe at gmail.com
Sun Dec 10 06:47:21 EST 2006


Thanks for your answers,
I though about the first solution too, but I've redundant code, say ie:
p = Paper(100,200)
p.draw( Rectangle(p,10,20,50,60) ) <-- we're forced to write 'p' two
times.

But that maybe the best solution, as I cannot see anything else.

For the second one, I need to make some calculus on the shape to be
drawn, so if I write:

shape.paper_coordinates = self.x, self.y
shape.draw()

It's too late, the calculus have already been done with the default
values, right or not? 

Thanks,
6TooL9




More information about the Python-list mailing list