mirror of
				https://github.com/LonamiWebs/Telethon.git
				synced 2025-11-04 01:47:27 +03:00 
			
		
		
		
	Override TLObject's __eq__ and __ne__ methods
This commit is contained in:
		
							parent
							
								
									add122bfe7
								
							
						
					
					
						commit
						fbd53e2126
					
				| 
						 | 
					@ -144,6 +144,12 @@ class TLObject:
 | 
				
			||||||
    def on_response(self, reader):
 | 
					    def on_response(self, reader):
 | 
				
			||||||
        self.result = reader.tgread_object()
 | 
					        self.result = reader.tgread_object()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def __eq__(self, o):
 | 
				
			||||||
 | 
					        return isinstance(o, type(self)) and self.to_dict() == o.to_dict()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def __ne__(self, o):
 | 
				
			||||||
 | 
					        return not isinstance(o, type(self)) or self.to_dict() != o.to_dict()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __str__(self):
 | 
					    def __str__(self):
 | 
				
			||||||
        return TLObject.pretty_format(self)
 | 
					        return TLObject.pretty_format(self)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user