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):
 | 
					    def __repr__(self):
 | 
				
			||||||
        return '<Object %s>' % self.name
 | 
					        return '<Object %s>' % self.name
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def __eq__(self, other):
 | 
				
			||||||
 | 
					        """define equality as 'attributes are the same'"""
 | 
				
			||||||
 | 
					        return self.__dict__ == other.__dict__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @property
 | 
					    @property
 | 
				
			||||||
    def explorer_path(self):
 | 
					    def explorer_path(self):
 | 
				
			||||||
        # create absolute path
 | 
					        # create absolute path
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue