This is primarily an issue of printing. The str() printer prints
things in a way that can be copy-pasted back into SymPy, and since
f'(0) isn't valid syntax, you end up with the more verbose
representation that is used for the expression.
It would be useful to have printers, at least pretty printers, that
printed f'(0) instead of the subs version. If a D object like Oscar
described existed, then the str printer could print that, since it
would be valid SymPy syntax.
It shouldn't be hard to make a printer that defines _print_Subs to
print things nicer for your use-case. I think some printers may
already exist that do this (perhaps in the mechanics module), though I
could be misremembering that.
Aaron Meurer
> To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/CAHVvXxQ-7iEgovJtmqaNm_5rudpwc2vdMObYkRqV71u5PhjFSg%40mail.gmail.com.