@classmethod lets you call the method as my_function.eval() (as
opposed to my_function().eval). This is required for eval() because
that is how the superclass uses it to instantiate the class. Think of
it as a special SymPy version of __new__.
The derivative defines how the function behaves with respect to things
that use the derivative, including series expansion and integration.
It is not required (none of the methods are required), but if you want
those things to work, you need to define it. Otherwise, it will just
come out as an unevaluated Derivative when you take the derivative.
Aaron Meurer
> --
> 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+un...@googlegroups.com.
> To post to this group, send email to
sy...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/sympy.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/sympy/4332b4c0-c3f6-4d90-807b-42b6ecd9cdd0%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.