mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	bpo-31236: Improved some error messages of min() and max().
This commit is contained in:
		
							parent
							
								
									84524454d0
								
							
						
					
					
						commit
						58cf7488d5
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -1519,8 +1519,9 @@ min_max(PyObject *args, PyObject *kwds, int op) | ||||||
|     emptytuple = PyTuple_New(0); |     emptytuple = PyTuple_New(0); | ||||||
|     if (emptytuple == NULL) |     if (emptytuple == NULL) | ||||||
|         return NULL; |         return NULL; | ||||||
|     ret = PyArg_ParseTupleAndKeywords(emptytuple, kwds, "|$OO", kwlist, |     ret = PyArg_ParseTupleAndKeywords(emptytuple, kwds, | ||||||
|                                       &keyfunc, &defaultval); |                                       (op == Py_LT) ? "|$OO:min" : "|$OO:max", | ||||||
|  |                                       kwlist, &keyfunc, &defaultval); | ||||||
|     Py_DECREF(emptytuple); |     Py_DECREF(emptytuple); | ||||||
|     if (!ret) |     if (!ret) | ||||||
|         return NULL; |         return NULL; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Oren Milman
						Oren Milman