Hi, I am new to sympy. I am trying to understand what is the best practice to check head of expression? For example: expr = sympify("somefunc(1-x)") How to understand that head of expr is somefunc? I can do it like this: if str(expr.func) == "somefunc" Is this a best practice or there is a better way to do this? And by the way, if I have the expression: expr = sympify("x") How can I check that expr is some variable (not necessary "x", but in more broader sense)? Or: expr = sympify("5.5777") how to check that expr is some number?
-- 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 sympy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/654926aa-8c56-4a27-8ca6-68f389273475n%40googlegroups.com.