Ask Your Question

Revision history [back]

Note that you can also use Python dicts instead of symbolic expressions, which is usually more robust for complex substitutions :

sage: def test(self, symb):          
....:     return self-self.subs({symb: symb-1})