smichr/sympy — comment on commit a4e2e9573a0e505a4edf7f7509f824ffcffda69e
File: sympy/core/basic.py line 849
By smichr:

Since I don't want the union, I used the construction which will fail as quickly as possible. It's like the difference between expr.has(x) and x in expr.atoms(): the former will return more quickly (on average) than the latter.