I agree it should be an error. SymPy is getting better at checking types of
inputs, but in general, you can expect a garbage in, garbage out behavior.

Aaron Meurer

On Sat, Feb 6, 2021 at 5:07 PM David Bailey <d...@dbailey.co.uk> wrote:

> Dear Group,
>
> While thinking about Jonathon's question, I came across this oddity:
>
> x=symbols('x')
>
> f=symbols('f',cls=Function)
>
> diff(f,x)
>
> 1
>
> Why 1? I think I would have expected it to generate a TypeError, just like
> f+x does.
>
> David
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/724a9342-6794-a600-7d8c-c41c331f20d5%40dbailey.co.uk
> <https://groups.google.com/d/msgid/sympy/724a9342-6794-a600-7d8c-c41c331f20d5%40dbailey.co.uk?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6LmR-wv0vKU_jMhF0Nu4zAGAN6fcDyPT22aunNBSTZBPw%40mail.gmail.com.

Reply via email to