diff --git a/Python/ceval.c b/Python/ceval.c index 5b72d8eeb7e..72f5eb14cfa 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;