mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	Add -3 option to the interpreter to warn about features that are
deprecated and will be changed/removed in Python 3.0. This patch is mostly from Anthony. I tweaked some format and added a little doc.
This commit is contained in:
		
							parent
							
								
									5f2ba9f2b1
								
							
						
					
					
						commit
						8b2bfbc198
					
				
					 7 changed files with 31 additions and 3 deletions
				
			
		|  | @ -144,6 +144,11 @@ builtin_apply(PyObject *self, PyObject *args) | |||
| 	PyObject *func, *alist = NULL, *kwdict = NULL; | ||||
| 	PyObject *t = NULL, *retval = NULL; | ||||
| 
 | ||||
| 	if (Py_Py3kWarningFlag && | ||||
| 	    PyErr_Warn(PyExc_DeprecationWarning,  | ||||
| 		       "apply() not supported in 3.x") < 0) | ||||
| 		return NULL; | ||||
| 
 | ||||
| 	if (!PyArg_UnpackTuple(args, "apply", 1, 3, &func, &alist, &kwdict)) | ||||
| 		return NULL; | ||||
| 	if (alist != NULL) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Neal Norwitz
						Neal Norwitz