summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-08-19 16:41:45 (GMT)
committerGuido van Rossum <guido@python.org>1992-08-19 16:41:45 (GMT)
commitf9a2d33f014a8de414da4aa9a464d7a5318f4876 (patch)
tree560eb67ec5281929c347af504bb22a9ab9e6df88 /Python/ceval.c
parent448f4bf45a3005023770133666a504eab5e4648f (diff)
downloadcpython-f9a2d33f014a8de414da4aa9a464d7a5318f4876.zip
cpython-f9a2d33f014a8de414da4aa9a464d7a5318f4876.tar.gz
cpython-f9a2d33f014a8de414da4aa9a464d7a5318f4876.tar.bz2
fix *serious* (new) bug in testbool: by default objects should test
true, not false!!!
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 5b72d8e..72f5eb1 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1422,7 +1422,7 @@ testbool(v)
else if (v->ob_type->tp_as_sequence != NULL)
res = (*v->ob_type->tp_as_sequence->sq_length)(v);
else
- res = 0;
+ res = 1;
if (res > 0)
res = 1;
return res;