mirror of https://github.com/python/cpython
SF #661437, apply() should get PendingDeprecation
This commit is contained in:
parent
88af4dfa4b
commit
94c30c0124
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue