atoms() works at the expression tree level, meaning it will only
return something if it exactly appears in the expression. In the
example x - 1, the expression is Add(x, -1), which doesn't contain 1.
It instead contains -1. Note that SymPy doesn't have a subtraction
class. Subtraction is represented as addition of a negative, where the
negative is represented as multiplication by -1 (or in the case of
number, just the negative number).
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 view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/bcd40bf3-44aa-4297-a218-2c71aadd3682n%40googlegroups.com.