代码的理解问题
def gcs(a,b,c=1):
if 0==a%2 and 0==b%2:
return gcs(a/2,b/2,c*2);
s = abs(a-b)
m = min(a,b)
if s == m:
return m*c
return gcs(s,m,c)
def __str__(self):
c = gcs(self.p, self.q)
return '%s/%s' % (self.p/c, self.q/c)
__repr__ = __str__
上述代码的意思,作用是什么