]> granicus.if.org Git - python/commitdiff
SF #661437, apply() should get PendingDeprecation
authorNeal Norwitz <nnorwitz@gmail.com>
Mon, 3 Feb 2003 20:23:33 +0000 (20:23 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Mon, 3 Feb 2003 20:23:33 +0000 (20:23 +0000)
Python/bltinmodule.c

index 54a9afd2e8b7c96f140f786ec2f984919a6feaca..466fab9a3c26884dbe0583cb9473b081fc47c92d 100644 (file)
@@ -73,6 +73,9 @@ builtin_apply(PyObject *self, PyObject *args)
        PyObject *func, *alist = NULL, *kwdict = 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))
                return NULL;
        if (alist != NULL) {