How to implement the following simple comparison function
I would like to implement the following simple function, but I cannot find an alternative for AnyType (interface?) that defines comparison operators. In the following code a
__ne__
is needed for ai != bi
.
It's as if I'm missing a manual. If someone knows how to do this, or knows how to make me cope that is cannot be done...
2 Replies
I think that since traits are not there yet, you have to do
if not ai.__eq__(bi)
or something like thatThanx for idea. I guess we would need to wait for traits, bacause AnyType do not define
__eq__
. Fix: don't use Vector. I've replaced it with A Tensor that does implement equality op.