indendation error

Gabriel Genellina gagenellina at softlab.com.ar
Fri Dec 26 20:17:51 EST 2003


At 26/12/2003 11:45, you wrote:

After you correct your indentation error, there is another issue:

>    def __str__(self):
>         print '(' + str(self.x) + str(self.y) + ')'

This should *return* a string, not print it.
Try: return '(%s,%s)' % (self.x, self.y)


Gabriel Genellina
Softlab SRL






More information about the Python-list mailing list