From 689735562d45a2c384fbe48069098a4459111fea Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Thu, 14 Aug 2003 20:37:34 +0000 Subject: Make filter(bool, ...) as fast as filter(None, ...). --- Python/bltinmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- cgit v0.12