Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 94c30c0

Browse files
committed
SF #661437, apply() should get PendingDeprecation
1 parent 88af4df commit 94c30c0

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Python/bltinmodule.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ builtin_apply(PyObject *self, PyObject *args)
7373
PyObject *func, *alist = NULL, *kwdict = NULL;
7474
PyObject *t = NULL, *retval = NULL;
7575

76+
PyErr_Warn(PyExc_PendingDeprecationWarning,
77+
"use func(*args, **kwargs) instead of "
78+
"apply(func, args, kwargs)");
7679
if (!PyArg_UnpackTuple(args, "apply", 1, 3, &func, &alist, &kwdict))
7780
return NULL;
7881
if (alist != NULL) {

0 commit comments

Comments
 (0)