![](https://secure.gravatar.com/avatar/94b4fff8f879a44af1f18fc5340309d3.jpg?s=120&d=mm&r=g)
May 1, 2001
8:05 a.m.
One change I've already made to the Polynomial code (and uploaded): compute the string version only once, upon initialization, and then have __call__ simply evaluate that string, like this: def __init__(self, coeffs): self.coeffs = [] # ... skip some lines self.strview = self.express() # <-- new def __call__(self,x): return eval(self.strview) # short! def __repr__(self): return self.strview # no need to recompute def express(self): """ Represent self as an algebraic expression """ ... Kirby