These are chat archives for sympy/sympy/optics
_eval_rewriteit ends up calling
__str__would be called from
_eval_rewrite, if this is how things work or what the idea is. On some example inside sympy. Then we need to figure out how to hook your own code into it.
if you add something like:
if hasattr(self, rule): return getattr(self, rule)(*terms)
it should work as expected
Basic._eval_rewriteimplementation wouldn't respect a