diff Python/bltinmodule.c @ 57308:2628216bc66d 2.6

Merged revisions 76350 via svnmerge from 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 ........
author Benjamin Peterson <benjamin@python.org>
date Tue, 17 Nov 2009 21:33:08 +0000
parents bca027b6df53
children 2b934d466993
line wrap: on
line diff
--- a/Python/bltinmodule.c	Mon Nov 16 19:17:54 2009 +0000
+++ b/Python/bltinmodule.c	Tue Nov 17 21:33:08 2009 +0000
@@ -224,7 +224,7 @@
 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));
 }