On Nov 21, 4:07 pm, MRAB <pyt...@mrabarnett.plus.com> wrote: > > I don't see the point of EvalNode and PrettyPrintNode. Why don't you > just give Integer, Sum and Product 'eval' and 'pprint' methods?
That's a good question, and it's the crux of my design dilemma. If ALL I ever wanted to to with Integer/Sum/Product was to eval() and pprint(), then I would just add those methods to Integer, Sum, and Product, and be done with it, as you suggest. But what happens when somebody wants to extend capability? Should every future software developer that wants to use Integer/Sum/Product extend those classes to get work done? What if they want to store additional state for nodes? -- http://mail.python.org/mailman/listinfo/python-list