diff options
author | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2003-08-14 20:37:34 (GMT) |
---|---|---|
committer | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2003-08-14 20:37:34 (GMT) |
commit | 689735562d45a2c384fbe48069098a4459111fea (patch) | |
tree | e7764a07dbdb781fb8fd163225d634ff60b03094 /Python/bltinmodule.c | |
parent | e5402fb340c5eea54858def3c5c294552a5f9faa (diff) | |
download | cpython-689735562d45a2c384fbe48069098a4459111fea.zip cpython-689735562d45a2c384fbe48069098a4459111fea.tar.gz cpython-689735562d45a2c384fbe48069098a4459111fea.tar.bz2 |
Make filter(bool, ...) as fast as filter(None, ...).
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r-- | Python/bltinmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index fb92478..9f41efc 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -197,7 +197,7 @@ builtin_filter(PyObject *self, PyObject *args) break; } - if (func == Py_None) { + if (func == (PyObject *)&PyBool_Type || func == Py_None) { ok = PyObject_IsTrue(item); } else { |