Actually, every SymPy function needs to call

arg = sympify(arg)

for each argument at the top anyway, and that usually takes care of
the type checking.  It just doesn't work in this case because we
sympify() the arguments of the list, but the returned object is not a
list.

I think the solution is to make _sympify() fail if the returned object
is not Basic, and use that inside the functions like integrate().
This function is supposed to be used there anyway (instead of regular
sympify), because it doesn't allow sympification of strings.

Does this sound like a good idea?

Aaron Meurer

On Wed, Nov 9, 2011 at 2:47 PM, Joachim Durchholz <[email protected]> wrote:
> Am 09.11.2011 20:07, schrieb Aaron Meurer:
>>
>> Except then every single high level function has to do type checking.
>> On the other hand, if you do it in the core, the chances of it being
>> hit when a high level function is given the wrong type are pretty
>> high, and the code is simpler.
>
> True, but the error message is harder to interpret.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" 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?hl=en.
>
>

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

Reply via email to