On Sun, Jun 7, 2009 at 7:32 AM, Alan Bromborsky<abro...@verizon.net> wrote: > > Gael Varoquaux wrote: >> On Sun, Jun 07, 2009 at 08:38:44AM -0400, Alan Bromborsky wrote: >> >>> Actually what I should have asked is how can you test if a function has >>> a particular argument >>> >> >> Check out the inspect module. >> >> >>> and how can you test for a function in general? >>> >> >> Sorry, I didn't get the question. >> >> Gaƫl >> >> > >> >> > If I write a function say F(x), I want to determine if x is a sympy > function and what its arguments are.
I would use: In [1]: a = f(x, y, z) In [2]: a Out[2]: f(x, y, z) In [3]: isinstance(a, Function) Out[3]: True In [4]: a.args Out[4]: (x, y, z) Ondrej --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---