When I asked a similar question some time ago (search on the mailing list) Ronan answered that both __new__ and __init__ can be used (__new__ is obviously necessary if you want your constructor to return a different class (Add(x,x)-->Mul(2,x))). Exactly because __new__ is obligatory sometimes most of the people choose to use it always in order to think less about it (not wondering when __init__ would be sufficient).
-- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
