I'm sorry: there's a bug in 0.9.7beta version (that's why it's a
beta version!), which make it think that certain objects are "false"
when they should actually be considered "true".
There have been several releases labeled "0.9.7beta", and I'm not sure
the current version still has the bug in it -- there's another bug I
need to hunt down before I dare to make a new beta release. Anyway,
here's a description of a fix. Edit the file "ceval.c" and find the
definition of function testbool(). There is a sequence of code ending
else if (v->ob_type->tp_as_sequence != NULL)
res = (*v->ob_type->tp_as_sequence->sq_length)(v);
res = 0;
The 0 in the last line should be a 1. That's all there is to the fix!
(BTW, I'm extremely glad that you listed your environment so carefully
-- without it I would have had a hard time this was for real.)
--Guido van Rossum, CWI, Amsterdam <email@example.com>
"I'm sorry, is this a five-minute argument, or the full half-hour?"