]> granicus.if.org Git - python/commitdiff
remove py3k warning for callable
authorBenjamin Peterson <benjamin@python.org>
Sun, 6 Nov 2011 13:20:12 +0000 (08:20 -0500)
committerBenjamin Peterson <benjamin@python.org>
Sun, 6 Nov 2011 13:20:12 +0000 (08:20 -0500)
Misc/NEWS
Python/bltinmodule.c

index 2f7b54e4e5cba22f2187219a0a2f1c4362458c0f..991136097377317860c08e8f671e4e197057a022 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -9,6 +9,8 @@ What's New in Python 2.7.3?
 Core and Builtins
 -----------------
 
+- Remove Py3k warning for callable.
+
 - Issue #13340: Accept None as start and stop parameters for
   list.index() and tuple.index().
 
index a9a7ad1009985e4db1c2b78526a0fbebb9e0f870..c25588a45e2261668db2bfb5891ae8cbde6d42de 100644 (file)
@@ -224,9 +224,6 @@ Return the binary representation of an integer or long integer.");
 static PyObject *
 builtin_callable(PyObject *self, PyObject *v)
 {
-    if (PyErr_WarnPy3k("callable() not supported in 3.1; "
-                       "use isinstance(x, collections.Callable)", 1) < 0)
-        return NULL;
     return PyBool_FromLong((long)PyCallable_Check(v));
 }