Status: New
Owner: [email protected]
Labels: Type-Defect Priority-Medium Milestone-Release0.7.0

New issue 1927 by [email protected]: Basic.__call__ is confusing and inconsistent
http://code.google.com/p/sympy/issues/detail?id=1927

There's a little-known, and probably never used, functionality that makes
all instances of Basic callable provided that the argument is a dictionary
- in which case expr(dict) returns expr.subs(dict). Not only is this
totally unintuitive, but it's also inconsistent with the behaviour of the
classes where __call__ does actually make sense. For instance:

In [1]: x({x:y})
Out[1]: [x(x)]

In [2]: (2*x)({x:y})
Out[2]: 2⋅y

In [3]: x(y)
Out[3]: x(y)

In [4]: (2*x)(y)
<snip>
TypeError: argument must be a dictionary


--
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