SF #661437, apply() should get PendingDeprecation

This commit is contained in:
Neal Norwitz 2003-02-03 20:23:33 +00:00
parent 88af4dfa4b
commit 94c30c0124
1 changed files with 3 additions and 0 deletions

View File

@ -73,6 +73,9 @@ builtin_apply(PyObject *self, PyObject *args)
PyObject *func, *alist = NULL, *kwdict = NULL; PyObject *func, *alist = NULL, *kwdict = NULL;
PyObject *t = NULL, *retval = NULL; PyObject *t = NULL, *retval = NULL;
PyErr_Warn(PyExc_PendingDeprecationWarning,
"use func(*args, **kwargs) instead of "
"apply(func, args, kwargs)");
if (!PyArg_UnpackTuple(args, "apply", 1, 3, &func, &alist, &kwdict)) if (!PyArg_UnpackTuple(args, "apply", 1, 3, &func, &alist, &kwdict))
return NULL; return NULL;
if (alist != NULL) { if (alist != NULL) {