From: Guido van Rossum Date: Wed, 19 Aug 1992 16:41:45 +0000 (+0000) Subject: fix *serious* (new) bug in testbool: by default objects should test X-Git-Tag: v0.9.8~209 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f9a2d33f014a8de414da4aa9a464d7a5318f4876;p=thirdparty%2FPython%2Fcpython.git fix *serious* (new) bug in testbool: by default objects should test true, not false!!! --- diff --git a/Python/ceval.c b/Python/ceval.c index 5b72d8eeb7e9..72f5eb14cfa9 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;