mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Changed builtin_sum to use PyNumber_InPlaceAdd (same semantics, but fixes
a performance bug in sum(manylists)), same as in 2.3 maintenance branch.
This commit is contained in:
		
							parent
							
								
									5cf6394b12
								
							
						
					
					
						commit
						a2777d3a55
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -1840,7 +1840,7 @@ builtin_sum(PyObject *self, PyObject *args) | |||
| 			} | ||||
| 			break; | ||||
| 		} | ||||
| 		temp = PyNumber_Add(result, item); | ||||
| 		temp = PyNumber_InPlaceAdd(result, item); | ||||
| 		Py_DECREF(result); | ||||
| 		Py_DECREF(item); | ||||
| 		result = temp; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alex Martelli
						Alex Martelli