comparison Python/bltinmodule.c @ 73402:39573be48b4a 2.7

remove py3k warning for callable
author Benjamin Peterson <benjamin@python.org>
date Sun, 06 Nov 2011 08:20:12 -0500
parents b57ace63286b
children d7aff4423172
comparison
equal deleted inserted replaced
73389:0f0eda4daac7 73402:39573be48b4a
222 222
223 223
224 static PyObject * 224 static PyObject *
225 builtin_callable(PyObject *self, PyObject *v) 225 builtin_callable(PyObject *self, PyObject *v)
226 { 226 {
227 if (PyErr_WarnPy3k("callable() not supported in 3.1; "
228 "use isinstance(x, collections.Callable)", 1) < 0)
229 return NULL;
230 return PyBool_FromLong((long)PyCallable_Check(v)); 227 return PyBool_FromLong((long)PyCallable_Check(v));
231 } 228 }
232 229
233 PyDoc_STRVAR(callable_doc, 230 PyDoc_STRVAR(callable_doc,
234 "callable(object) -> bool\n\ 231 "callable(object) -> bool\n\