Comment #4 on issue 1612 by asmeurer: Symbol('f')(x) != Function('f')(x)
http://code.google.com/p/sympy/issues/detail?id=1612
Basic.__eq__ does the check "if type(self) is not type(other):…" But we
have
In [26]: a = f(x)
In [27]: b = S("f(x)")
In [28]: type(a) == type(b)
Out[28]: True
In [29]: type(a) is type(b)
Out[29]: False
In [1]: type(f(x))
Out[1]: f
If I change it to !=, it works:
In [1]: f(x) == S("f(x)")
Out[1]: True
and all tests pass.
I'm not sure if it's really proper for type to be returning something that
can't be compared with "is", but this at least fixes this.
--
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.