
Although nothing in Python prevents defining __eq__() how you want and having it return other values can still be problematic to do so because of the way that __eq__() is tied to __hash__() and used in dicts and sets.
I think, this can work if you guarantee there are no hash collisions. This is doable, if you restrict yourself by some symbolic class hierarchy: e.g. you can enumerate symbolic objects within the session. Probably, id() will work: remember - all your objects are singletons! But you will not be able to mix built-in data types and your symbolic objects in same set, for example. In fact, this might be not a too high price: e.g. SymPy already uses Integer's and Rational's instead of built-in types. So, every "external" object must be converted to your class hierarchy.
Also a==b should only return True
That's an easy thing, but I doubt that the docs enforce us to do this.