comparison Python/bltinmodule.c @ 31122:69de5aee1fbb legacy-trunk

Remove the PendingDeprecationWarning from apply(). apply() will remain deprecated in the documentation.
author Fred Drake <fdrake@acm.org>
date Fri, 05 Dec 2003 17:34:27 +0000
parents 54ff68e973ee
children c06b570adf12
comparison
equal deleted inserted replaced
31117:60e5d8b7e964 31122:69de5aee1fbb
73 builtin_apply(PyObject *self, PyObject *args) 73 builtin_apply(PyObject *self, PyObject *args)
74 { 74 {
75 PyObject *func, *alist = NULL, *kwdict = NULL; 75 PyObject *func, *alist = NULL, *kwdict = NULL;
76 PyObject *t = NULL, *retval = NULL; 76 PyObject *t = NULL, *retval = NULL;
77 77
78 if (PyErr_Warn(PyExc_PendingDeprecationWarning,
79 "use func(*args, **kwargs) instead of "
80 "apply(func, args, kwargs)") < 0)
81 return NULL;
82 if (!PyArg_UnpackTuple(args, "apply", 1, 3, &func, &alist, &kwdict)) 78 if (!PyArg_UnpackTuple(args, "apply", 1, 3, &func, &alist, &kwdict))
83 return NULL; 79 return NULL;
84 if (alist != NULL) { 80 if (alist != NULL) {
85 if (!PyTuple_Check(alist)) { 81 if (!PyTuple_Check(alist)) {
86 if (!PySequence_Check(alist)) { 82 if (!PySequence_Check(alist)) {