Le lundi 14 mai 2012 à 22:57 +0200, [email protected] a écrit : > I was wandering in the code base when I noticed that Lambda is > subclassing Expr and not Application. Do you have any comments on how > appropriate this is? > > My opinion is that there are generally too many classes with unclear > boundaries (Basic<->Expr, Application<->Function and even > Tuple<->Matrix (discussed elsewhere)), but I am sufficiently new to > the project to know that I may be missing something. > > So, neglecting the other possible occurrences of similar problems, > should Lambda subclass Application instead of Expr? > A Lambda is a function, while Application is the base class for the image of an object by a function. These are completely different things, so neither should be a subclass of the other.
Note that I don't think it makes much sense for Lambda to subclass Expr: Lambdas can't be meaningfully added or multiplied together (well, technically you can, but the result doesn't behave like a Lambda at all). -- 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.
