Commit 7b16da72 authored by peastman's avatar peastman
Browse files

Merge pull request #227 from pgrinaway/units

Implemented equality and inequality operators for BaseDimension
parents 4c5e01a1 8d6d5521
......@@ -89,6 +89,16 @@ class BaseDimension(object):
def __repr__(self):
return 'BaseDimension("%s")' % self.name
def __eq__(self, other):
if isInstance(other, BaseDimension):
return self._index == other._index
return False
def __ne__(self, other):
if isInstance(other, BaseDimension):
return self._index != other._index
return False
# run module directly for testing
......
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