Status: Accepted
Owner: Vinzent.Steinberg
Labels: Type-Defect Priority-High

New issue 1335 by Vinzent.Steinberg: WildFunction() broken
http://code.google.com/p/sympy/issues/detail?id=1335

 From our tutorial:

>>> from sympy import *
>>> x = Symbol('x')
>>> p = Wild('p')
>>> f = WildFunction('f', nofargs=1)
>>> (5*cos(x)).match(p*f)
{f_: cos(x), p_: 5}
>>> (5*cos(x)).match(f) # this should also work
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/home/one/src/sympy/git/sympy/core/basic.py", line 1298, in match
     return pattern.matches(self, {})
   File "sympy/core/function.py", line 409, in matches
     if pattern.nargs != expr.nargs:
AttributeError: 'Mul' object has no attribute 'nargs'
>>> (cos(3*x)).match(f(p*x))
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/home/one/src/sympy/git/sympy/core/basic.py", line 1946, in __call__
     raise TypeError("argument must be a dictionary")
TypeError: argument must be a dictionary

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-issues" 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-issues?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to