Somebody can explain me what does this function do?
class fastfrac:
def __init__(self,top,bot=1):
if parent(top) == ZZ or parent(top) == R:
self.top = R(top)
self.bot = R(bot)
elif top.__class__ == fastfrac:
self.top = top.top
self.bot = top.bot * bot
else:
self.top = R(numerator(top))
self.bot = R(denominator(top)) * bot
For example, parent() function I don't know what does it do. I search information but I didn't find nothing.
Thank you so much