halgari/clojure-py — pull request #62 by aschoerk (2012-03-16 15:27:43+00:00)
Title: A few corrections to set-handling

Hello,
I thought I try a few tests I found in clojure-script and tried to fix them.
Until now not everything works, but I thought I check in early.

A special find I was not aware of yet was:

!= is not equivalent to using "not foo.__eq__()" but only searches for __ne__

According to
http://docs.python.org/release/2.5.2/ref/customization.html

There are no implied relationships among the comparison operators. The truth of x==y does not imply that x!=y is false. Accordingly, when defining __eq__(), one should also define __ne__() so that the operators will behave as expected.

I hope I understood this right, did not find it for 2.7.2 yet.

There might be more problems in other datastructures not having __ne__ yet. (vector, map, list)