summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-11-17 21:24:54 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-11-17 21:24:54 (GMT)
commit90ed611f6d60caeb59b1d9518f9f76a19436c8a5 (patch)
treeff15099661bc22f5b5692cacbedde2d22c70cd7c
parentfab8be2f99889a21c0651c7e7ac0d7ffa91a872c (diff)
downloadcpython-90ed611f6d60caeb59b1d9518f9f76a19436c8a5.zip
cpython-90ed611f6d60caeb59b1d9518f9f76a19436c8a5.tar.gz
cpython-90ed611f6d60caeb59b1d9518f9f76a19436c8a5.tar.bz2
a better callable replacement
-rw-r--r--Python/bltinmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index c060770..fcae58a 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -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));
}