]> granicus.if.org Git - python/commitdiff
Merged revisions 76350 via svnmerge from
authorBenjamin Peterson <benjamin@python.org>
Tue, 17 Nov 2009 21:33:08 +0000 (21:33 +0000)
committerBenjamin Peterson <benjamin@python.org>
Tue, 17 Nov 2009 21:33:08 +0000 (21:33 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r76350 | benjamin.peterson | 2009-11-17 15:24:54 -0600 (Tue, 17 Nov 2009) | 1 line

  a better callable replacement
........

Python/bltinmodule.c

index 87da3c9fff12143bbb019b1490425709a9a06d96..1cab40c049ecbfc7e436db2699756586022282c3 100644 (file)
@@ -224,7 +224,7 @@ static PyObject *
 builtin_callable(PyObject *self, PyObject *v)
 {
        if (PyErr_WarnPy3k("callable() not supported in 3.x; "
-                          "use hasattr(o, '__call__')", 1) < 0)
+                          "use isinstance(x, collections.Callable)", 1) < 0)
                return NULL;
        return PyBool_FromLong((long)PyCallable_Check(v));
 }