mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	bpo-37685: Fixed __eq__, __lt__ etc implementations in some classes. (GH-14952)
They now return NotImplemented for unsupported type of the other operand.
This commit is contained in:
		
							parent
							
								
									4c69be22df
								
							
						
					
					
						commit
						662db125cd
					
				
					 23 changed files with 1295 additions and 1150 deletions
				
			
		|  | @ -371,7 +371,7 @@ def __eq__(self, other): | |||
|                     self.cached == other.cached and | ||||
|                     self.has_location == other.has_location) | ||||
|         except AttributeError: | ||||
|             return False | ||||
|             return NotImplemented | ||||
| 
 | ||||
|     @property | ||||
|     def cached(self): | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Serhiy Storchaka
						Serhiy Storchaka