when comparing objects, define equality as 'attributes are the same'
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
0f413f8e4d
commit
e27cd9e809
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue