Skip to content Skip to sidebar Skip to footer
Showing posts with the label Equality

When Is The `==` Operator Not Equivalent To The `is` Operator? (python)

I noticed I can use the == operator to compare all the native data types (integers, strings, boolea… Read more When Is The `==` Operator Not Equivalent To The `is` Operator? (python)

Recommended Way To Implement __eq__ And __hash__

The python documentation mentions that if you override __eq__ and the object is immutable, you shou… Read more Recommended Way To Implement __eq__ And __hash__

Python Fails To Compare Strings

I'm facing a strange problem in python. I have a maze, x's stand for walls, g is a goal, s … Read more Python Fails To Compare Strings

Python Equality Precedence

class L(object): def __eq__(self, other): print 'invoked L.__eq__' retu… Read more Python Equality Precedence