Commit 1f1a28b5 authored by Patrick Grinaway's avatar Patrick Grinaway
Browse files

Added implementation for equality __eq__() and inequality __ne__() operators

parent 72959084
......@@ -90,6 +90,16 @@ class BaseDimension(object):
def __repr__(self):
return 'BaseDimension("%s")' % self.name
def __eq__(self, other):
if self._index == other._index:
return True
return False
def __ne__(self, other):
if self._index == other._index:
return False
return True
# run module directly for testing
if __name__=='__main__':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment