when comparing objects, define equality as 'attributes are the same'

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-10-10 09:23:27 +02:00
parent 0f413f8e4d
commit e27cd9e809

View file

@ -80,6 +80,10 @@ class Object(object):
def __repr__(self):
return '<Object %s>' % self.name
def __eq__(self, other):
"""define equality as 'attributes are the same'"""
return self.__dict__ == other.__dict__
@property
def explorer_path(self):
# create absolute path