On Fri, Aug 31, 2012 at 3:30 PM, Juha Jeronen <[email protected]> wrote: > Hi all (again), > > And here's a fixed version. The code I just posted returned some nonsensical > results, because it didn't filter out modules and classes. >
Another way to maybe approach this problem (getting a non-clashing form of an expression sympified) is this: * the user must know what functions they are using: they/you give a list of these and this list must agree with the representation of that function's name in sympy * they give an expressions * let python parse this (I don't recall which does that now -- there's some module for parsing python code character by character) and when it identifies a variable either 1) it is a function that has already been identified or it is intended as a symbol and 2a) sympy agrees or 2b) sympy disagrees and wants to make it a class or anything other than a symbol. * in case of 2b the user's symbol must be de-clashed, by appending underscores until the clash goes away; this symbol replaces what the user chose * the modified input function is returned. -- 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.
