mirror of
https://github.com/python/cpython.git
synced 2025-07-27 13:14:41 +00:00
Close #12501: Adjust callable() warning: callable() is only not supported in
Python 3.1. callable() is again supported in Python 3.2.
This commit is contained in:
parent
885b164bfe
commit
ba8b3a2ca7
3 changed files with 5 additions and 1 deletions
|
@ -224,7 +224,7 @@ 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.x; "
|
||||
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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue