after this test you don't know that the base is an Add...it could be a Mul or any other 2-arg object. A test showing that those sorts of objects are properly handled should be added and (I think) this if-test should be `if not (base.is_Add and len(base.args) == 2 and exp.is_Number):` (?)