I'm not a fan of the syntax, but otherwise I think you have the right idea.
Aaron Meurer On Tue, Nov 12, 2013 at 1:24 AM, F. B. <[email protected]> wrote: > Obviously, Add could change its template according to the cases: > > Add(x, y) ===> Add[AssocOp](x, y) > Add(x, y) + Add(oo,1) ===> Add(Add[AssocOp](x,y), Add[InfinitiesT](oo)) > ===> Add[InfinitiesT](x,y,oo) > > Add's __new__ constructor could be dispatched to handle specific cases for > these templates. > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/sympy. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. For more options, visit https://groups.google.com/groups/opt_out.
