mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	Fix for SF bug #485678.
slot_tp_descr_set(): When deleting an attribute described by a descriptor implemented in Python, the descriptor's __del__ method is called by the slot_tp_descr_set dispatch function. This is bogus -- __del__ already has a different meaning. Renaming this use of __del__ is renamed to __delete__.
This commit is contained in:
		
							parent
							
								
									55070f5d96
								
							
						
					
					
						commit
						1d5b3f29ff
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -3281,7 +3281,7 @@ slot_tp_descr_set(PyObject *self, PyObject *target, PyObject *value)
 | 
			
		|||
	static PyObject *del_str, *set_str;
 | 
			
		||||
 | 
			
		||||
	if (value == NULL)
 | 
			
		||||
		res = call_method(self, "__del__", &del_str,
 | 
			
		||||
		res = call_method(self, "__delete__", &del_str,
 | 
			
		||||
				  "(O)", target);
 | 
			
		||||
	else
 | 
			
		||||
		res = call_method(self, "__set__", &set_str,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue