Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

test value of symbolic expression's operator

I need to define a boolean function is_pow that takes for argument a symbolic expression expr an that return True if and only if expr.operator is the builtin function pow. But I don'n know which the syntax to use:

Of course

def is_pow(expr): return expr.operator() == <built-in function pow>

doesn't work. Has someone the answer ? Thanks a lot.

test value of symbolic expression's operator

I need to define a boolean function is_pow that takes for argument a symbolic expression expr an that return True if and only if expr.operator is the builtin function pow. But I don'n know which the syntax to use:

Of course

def is_pow(expr):
 return expr.operator() ==  <built-in &lt;built-in function pow> 

pow&gt;

doesn't work. Has someone the answer ? Thanks a lot.